1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * FUJITSU Extended Socket Network Device driver
4 * Copyright (c) 2015 FUJITSU LIMITED
10 #include <linux/acpi.h>
14 #define FJES_ACPI_SYMBOL "Extended Socket"
15 #define FJES_MAX_QUEUES 1
16 #define FJES_TX_RETRY_INTERVAL (20 * HZ)
17 #define FJES_TX_RETRY_TIMEOUT (100)
18 #define FJES_TX_TX_STALL_TIMEOUT (FJES_TX_RETRY_INTERVAL / 2)
19 #define FJES_OPEN_ZONE_UPDATE_WAIT (300) /* msec */
20 #define FJES_IRQ_WATCH_DELAY (HZ)
22 /* board specific private data structure */
24 struct net_device
*netdev
;
25 struct platform_device
*plat_dev
;
27 struct napi_struct napi
;
28 struct rtnl_link_stats64 stats64
;
30 unsigned int tx_retry_count
;
31 unsigned long tx_start_jiffies
;
32 unsigned long rx_last_jiffies
;
35 struct work_struct force_close_task
;
41 struct workqueue_struct
*txrx_wq
;
42 struct workqueue_struct
*control_wq
;
44 struct work_struct tx_stall_task
;
45 struct work_struct raise_intr_rxdata_task
;
47 struct work_struct unshare_watch_task
;
48 unsigned long unshare_watch_bitmask
;
50 struct delayed_work interrupt_watch_task
;
51 bool interrupt_watch_enable
;
55 #ifdef CONFIG_DEBUG_FS
56 struct dentry
*dbg_adapter
;
60 extern char fjes_driver_name
[];
61 extern char fjes_driver_version
[];
62 extern const u32 fjes_support_mtu
[];
64 void fjes_set_ethtool_ops(struct net_device
*);
66 #ifdef CONFIG_DEBUG_FS
67 void fjes_dbg_adapter_init(struct fjes_adapter
*adapter
);
68 void fjes_dbg_adapter_exit(struct fjes_adapter
*adapter
);
69 void fjes_dbg_init(void);
70 void fjes_dbg_exit(void);
72 static inline void fjes_dbg_adapter_init(struct fjes_adapter
*adapter
) {}
73 static inline void fjes_dbg_adapter_exit(struct fjes_adapter
*adapter
) {}
74 static inline void fjes_dbg_init(void) {}
75 static inline void fjes_dbg_exit(void) {}
76 #endif /* CONFIG_DEBUG_FS */