2 * FUJITSU Extended Socket Network Device driver
3 * Copyright (c) 2015 FUJITSU LIMITED
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, see <http://www.gnu.org/licenses/>.
17 * The full GNU General Public License is included in this distribution in
18 * the file called "COPYING".
25 #include <linux/acpi.h>
29 #define FJES_ACPI_SYMBOL "Extended Socket"
30 #define FJES_MAX_QUEUES 1
31 #define FJES_TX_RETRY_INTERVAL (20 * HZ)
32 #define FJES_TX_RETRY_TIMEOUT (100)
33 #define FJES_TX_TX_STALL_TIMEOUT (FJES_TX_RETRY_INTERVAL / 2)
34 #define FJES_OPEN_ZONE_UPDATE_WAIT (300) /* msec */
35 #define FJES_IRQ_WATCH_DELAY (HZ)
37 /* board specific private data structure */
39 struct net_device
*netdev
;
40 struct platform_device
*plat_dev
;
42 struct napi_struct napi
;
43 struct rtnl_link_stats64 stats64
;
45 unsigned int tx_retry_count
;
46 unsigned long tx_start_jiffies
;
47 unsigned long rx_last_jiffies
;
50 struct work_struct force_close_task
;
56 struct workqueue_struct
*txrx_wq
;
57 struct workqueue_struct
*control_wq
;
59 struct work_struct tx_stall_task
;
60 struct work_struct raise_intr_rxdata_task
;
62 struct work_struct unshare_watch_task
;
63 unsigned long unshare_watch_bitmask
;
65 struct delayed_work interrupt_watch_task
;
66 bool interrupt_watch_enable
;
70 #ifdef CONFIG_DEBUG_FS
71 struct dentry
*dbg_adapter
;
75 extern char fjes_driver_name
[];
76 extern char fjes_driver_version
[];
77 extern const u32 fjes_support_mtu
[];
79 void fjes_set_ethtool_ops(struct net_device
*);
81 #ifdef CONFIG_DEBUG_FS
82 void fjes_dbg_adapter_init(struct fjes_adapter
*adapter
);
83 void fjes_dbg_adapter_exit(struct fjes_adapter
*adapter
);
84 void fjes_dbg_init(void);
85 void fjes_dbg_exit(void);
87 static inline void fjes_dbg_adapter_init(struct fjes_adapter
*adapter
) {}
88 static inline void fjes_dbg_adapter_exit(struct fjes_adapter
*adapter
) {}
89 static inline void fjes_dbg_init(void) {}
90 static inline void fjes_dbg_exit(void) {}
91 #endif /* CONFIG_DEBUG_FS */