33 #include <linux/version.h> 34 #include <linux/types.h> 35 #include <linux/errno.h> 36 #include <linux/module.h> 37 #include <linux/pci.h> 38 #include <linux/netdevice.h> 39 #include <linux/ioport.h> 40 #include <linux/slab.h> 41 #include <linux/pagemap.h> 42 #include <linux/list.h> 43 #include <linux/sched.h> 46 #include <rtnet_port.h> 49 #define irqreturn_t void 54 #ifndef SET_NETDEV_DEV 55 #define SET_NETDEV_DEV(net, pdev) 61 #undef E1000_COUNT_ICR 62 #undef NETIF_F_HW_VLAN_TX 63 #undef CONFIG_NET_POLL_CONTROLLER 64 #undef ETHTOOL_OPS_COMPAT 65 #undef ETHTOOL_GPERMADDR 67 #ifndef HAVE_FREE_NETDEV 68 #define free_netdev(x) kfree(x) 72 #undef CONFIG_E1000_NAPI 74 #undef CONFIG_E1000_DISABLE_PACKET_SPLIT 75 #define CONFIG_E1000_DISABLE_PACKET_SPLIT 1 78 #ifdef DISABLE_PCI_MSI 88 #define module_param(v,t,p) MODULE_PARM(v, "i"); 91 #ifndef DMA_64BIT_MASK 92 #define DMA_64BIT_MASK 0xffffffffffffffffULL 95 #ifndef DMA_32BIT_MASK 96 #define DMA_32BIT_MASK 0x00000000ffffffffULL 101 #define unlikely(_x) _x 102 #define likely(_x) _x 107 #define PCI_DEVICE(vend,dev) \ 108 .vendor = (vend), .device = (dev), \ 109 .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID 115 #ifndef ETHTOOL_GSTATS 116 #define ETHTOOL_GSTATS 0x1d 117 #undef ethtool_drvinfo 118 #define ethtool_drvinfo k_ethtool_drvinfo 119 struct k_ethtool_drvinfo {
128 uint32_t testinfo_len;
130 uint32_t regdump_len;
133 struct ethtool_stats {
139 #ifndef ETHTOOL_PHYS_ID 140 #define ETHTOOL_PHYS_ID 0x1c 141 #ifndef ETHTOOL_GSTRINGS 142 #define ETHTOOL_GSTRINGS 0x1b 143 enum ethtool_stringset {
147 struct ethtool_gstrings {
154 #define ETHTOOL_TEST 0x1a 155 enum ethtool_test_flags {
156 ETH_TEST_FL_OFFLINE = (1 << 0),
157 ETH_TEST_FL_FAILED = (1 << 1),
159 struct ethtool_test {
166 #ifndef ETHTOOL_GEEPROM 167 #define ETHTOOL_GEEPROM 0xb 169 struct ethtool_eeprom {
177 struct ethtool_value {
182 #ifndef ETHTOOL_GLINK 183 #define ETHTOOL_GLINK 0xa 191 #ifndef ETHTOOL_GREGS 192 #define ETHTOOL_GREGS 0x00000004 193 #define ethtool_regs _kc_ethtool_regs 195 struct _kc_ethtool_regs {
202 #ifndef ETHTOOL_GMSGLVL 203 #define ETHTOOL_GMSGLVL 0x00000007 205 #ifndef ETHTOOL_SMSGLVL 206 #define ETHTOOL_SMSGLVL 0x00000008 208 #ifndef ETHTOOL_NWAY_RST 209 #define ETHTOOL_NWAY_RST 0x00000009 211 #ifndef ETHTOOL_GLINK 212 #define ETHTOOL_GLINK 0x0000000a 214 #ifndef ETHTOOL_GEEPROM 215 #define ETHTOOL_GEEPROM 0x0000000b 217 #ifndef ETHTOOL_SEEPROM 218 #define ETHTOOL_SEEPROM 0x0000000c 220 #ifndef ETHTOOL_GCOALESCE 221 #define ETHTOOL_GCOALESCE 0x0000000e 223 #define ethtool_coalesce _kc_ethtool_coalesce 224 struct _kc_ethtool_coalesce {
231 u32 rx_coalesce_usecs;
239 u32 rx_max_coalesced_frames;
246 u32 rx_coalesce_usecs_irq;
247 u32 rx_max_coalesced_frames_irq;
253 u32 tx_coalesce_usecs;
261 u32 tx_max_coalesced_frames;
268 u32 tx_coalesce_usecs_irq;
269 u32 tx_max_coalesced_frames_irq;
276 u32 stats_block_coalesce_usecs;
285 u32 use_adaptive_rx_coalesce;
286 u32 use_adaptive_tx_coalesce;
293 u32 rx_coalesce_usecs_low;
294 u32 rx_max_coalesced_frames_low;
295 u32 tx_coalesce_usecs_low;
296 u32 tx_max_coalesced_frames_low;
308 u32 rx_coalesce_usecs_high;
309 u32 rx_max_coalesced_frames_high;
310 u32 tx_coalesce_usecs_high;
311 u32 tx_max_coalesced_frames_high;
316 u32 rate_sample_interval;
319 #ifndef ETHTOOL_SCOALESCE 320 #define ETHTOOL_SCOALESCE 0x0000000f 322 #ifndef ETHTOOL_GRINGPARAM 323 #define ETHTOOL_GRINGPARAM 0x00000010 325 #define ethtool_ringparam _kc_ethtool_ringparam 326 struct _kc_ethtool_ringparam {
334 u32 rx_mini_max_pending;
335 u32 rx_jumbo_max_pending;
343 u32 rx_jumbo_pending;
347 #ifndef ETHTOOL_SRINGPARAM 348 #define ETHTOOL_SRINGPARAM 0x00000011 350 #ifndef ETHTOOL_GPAUSEPARAM 351 #define ETHTOOL_GPAUSEPARAM 0x00000012 353 #define ethtool_pauseparam _kc_ethtool_pauseparam 354 struct _kc_ethtool_pauseparam {
372 #ifndef ETHTOOL_SPAUSEPARAM 373 #define ETHTOOL_SPAUSEPARAM 0x00000013 375 #ifndef ETHTOOL_GRXCSUM 376 #define ETHTOOL_GRXCSUM 0x00000014 378 #ifndef ETHTOOL_SRXCSUM 379 #define ETHTOOL_SRXCSUM 0x00000015 381 #ifndef ETHTOOL_GTXCSUM 382 #define ETHTOOL_GTXCSUM 0x00000016 384 #ifndef ETHTOOL_STXCSUM 385 #define ETHTOOL_STXCSUM 0x00000017 388 #define ETHTOOL_GSG 0x00000018 392 #define ETHTOOL_SSG 0x00000019 396 #define ETHTOOL_TEST 0x0000001a 398 #ifndef ETHTOOL_GSTRINGS 399 #define ETHTOOL_GSTRINGS 0x0000001b 401 #ifndef ETHTOOL_PHYS_ID 402 #define ETHTOOL_PHYS_ID 0x0000001c 404 #ifndef ETHTOOL_GSTATS 405 #define ETHTOOL_GSTATS 0x0000001d 408 #define ETHTOOL_GTSO 0x0000001e 411 #define ETHTOOL_STSO 0x0000001f 415 #define NET_IP_ALIGN 2 419 #define NETDEV_TX_OK 0 422 #ifndef NETDEV_TX_BUSY 423 #define NETDEV_TX_BUSY 1 426 #ifndef NETDEV_TX_LOCKED 427 #define NETDEV_TX_LOCKED -1 432 #ifndef SKB_DATAREF_SHIFT 433 #define skb_header_cloned(x) 0 440 #define USE_DRIVER_SHUTDOWN_HANDLER 443 #define SA_PROBEIRQ 0