Go to the documentation of this file.
35 #include <linux/stddef.h>
36 #include <linux/module.h>
37 #include <linux/types.h>
38 #include <asm/byteorder.h>
41 #include <linux/errno.h>
43 #include <linux/pci.h>
44 #include <linux/kernel.h>
45 #include <linux/netdevice.h>
50 #include <linux/slab.h>
53 #include <linux/string.h>
56 #include <linux/bitops.h>
59 #include <linux/capability.h>
62 #include <linux/ipv6.h>
63 #include <linux/tcp.h>
64 #include <linux/udp.h>
66 #include <linux/list.h>
67 #include <linux/reboot.h>
69 #include <linux/mii.h>
70 #include <linux/ethtool.h>
71 #include <linux/if_vlan.h>
77 #define INTEL_E1000_ETHERNET_DEVICE(device_id) {\
78 PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)}
84 #define E1000_MAX_INTR 10
87 #define E1000_DEFAULT_TXD 256
88 #define E1000_MAX_TXD 256
89 #define E1000_MIN_TXD 48
90 #define E1000_MAX_82544_TXD 4096
92 #define E1000_DEFAULT_RXD 256
93 #define E1000_MAX_RXD 256
94 #define E1000_MIN_RXD 48
95 #define E1000_MAX_82544_RXD 4096
97 #define E1000_MIN_ITR_USECS 10
98 #define E1000_MAX_ITR_USECS 10000
101 #define MAXIMUM_ETHERNET_VLAN_SIZE 1522
104 #define E1000_RXBUFFER_128 128
105 #define E1000_RXBUFFER_256 256
106 #define E1000_RXBUFFER_512 512
107 #define E1000_RXBUFFER_1024 1024
108 #define E1000_RXBUFFER_2048 2048
109 #define E1000_RXBUFFER_4096 4096
110 #define E1000_RXBUFFER_8192 8192
111 #define E1000_RXBUFFER_16384 16384
114 #define E1000_SMARTSPEED_DOWNSHIFT 3
115 #define E1000_SMARTSPEED_MAX 15
118 #define E1000_PBA_BYTES_SHIFT 0xA
119 #define E1000_TX_HEAD_ADDR_SHIFT 7
120 #define E1000_PBA_TX_MASK 0xFFFF0000
123 #define E1000_FC_HIGH_DIFF 0x1638
124 #define E1000_FC_LOW_DIFF 0x1640
126 #define E1000_FC_PAUSE_TIME 0xFFFF
129 #define E1000_TX_QUEUE_WAKE 16
131 #define E1000_RX_BUFFER_WRITE 16
133 #define AUTO_ALL_MODES 0
134 #define E1000_EEPROM_82544_APM 0x0004
135 #define E1000_EEPROM_APME 0x0400
137 #ifndef E1000_MASTER_SLAVE
139 #define E1000_MASTER_SLAVE e1000_ms_hw_default
142 #define E1000_MNG_VLAN_NONE (-1)
203 #define E1000_DESC_UNUSED(R) \
204 ((((R)->next_to_clean > (R)->next_to_use) \
205 ? 0 : (R)->count) + (R)->next_to_clean - (R)->next_to_use - 1)
207 #define E1000_RX_DESC_EXT(R, i) \
208 (&(((union e1000_rx_desc_extended *)((R).desc))[i]))
209 #define E1000_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i]))
210 #define E1000_RX_DESC(R, i) E1000_GET_DESC(R, i, e1000_rx_desc)
211 #define E1000_TX_DESC(R, i) E1000_GET_DESC(R, i, e1000_tx_desc)
212 #define E1000_CONTEXT_DESC(R, i) E1000_GET_DESC(R, i, e1000_context_desc)
262 int *work_done,
int work_to_do);
325 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
328 #define e_dbg(format, arg...) \
329 netdev_dbg(e1000_get_hw_dev(hw), format, ## arg)
330 #define e_err(msglvl, format, arg...) \
331 netif_err(adapter, msglvl, adapter->netdev, format, ## arg)
332 #define e_info(msglvl, format, arg...) \
333 netif_info(adapter, msglvl, adapter->netdev, format, ## arg)
334 #define e_warn(msglvl, format, arg...) \
335 netif_warn(adapter, msglvl, adapter->netdev, format, ## arg)
336 #define e_notice(msglvl, format, arg...) \
337 netif_notice(adapter, msglvl, adapter->netdev, format, ## arg)
338 #define e_dev_info(format, arg...) \
339 dev_info(&adapter->pdev->dev, format, ## arg)
340 #define e_dev_warn(format, arg...) \
341 dev_warn(&adapter->pdev->dev, format, ## arg)
342 #define e_dev_err(format, arg...) \
343 dev_err(&adapter->pdev->dev, format, ## arg)