diff options
author | David S. Miller <davem@davemloft.net> | 2016-04-07 11:50:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-07 11:50:30 -0400 |
commit | 94ab1ea94c71b7ba3e835315d69880a8086d7ab1 (patch) | |
tree | fae8008ed47ede0a80df70aeb4f29b4aef3ef260 | |
parent | de6099e27ef33086d7a967bbfce078952312b74d (diff) | |
parent | d99e366fc90c9b6e6197584ecd3a185441452b0c (diff) |
Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
====================
1GbE Intel Wired LAN Driver Updates 2016-04-06
This series contains updates to e1000, e1000e, igb and Kconfig.
Alex fixes igb where we were casting the MAC address as __beXX and then
passing it into le32_to_cpu, when we could simply cast as __lexx to
maintain consistency since it is already little endian. Then enabled
bulk free in transmit cleanup for igb.
John Holland enables igb to pickup the MAC address from a device tree
blob when CONFIG_OF has been enabled.
Doron Shikmoni fixes a bug in the output of "ethtool -m ethX" where
the data byte appeared duplicated.
Stefan fixes up e1000 and e1000e ethtool offline tests which were calling
dev_close() which causes IFF_UP to be cleared which removes teh interface
routes and some addresses, so use ndo_stop() instead.
Jiri Benc cleans up some old links in the Kconfig for Intel drivers where
we referred to a URL which is no longer valid. I am so glad Jiri has the
time in his day to spend clicking on and testing all the URL links in the
the kernel.
Arika Chen reverts the addition of a 'rtnl_unlock()' which had a unmatched
'rtnl_lock()' call before it.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/intel/Kconfig | 80 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000/e1000.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000/e1000_main.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/e1000.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ethtool.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/netdev.c | 12 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_ethtool.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_main.c | 32 |
9 files changed, 53 insertions, 94 deletions
diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig index 3772f3ac956e..714bd1014ddb 100644 --- a/drivers/net/ethernet/intel/Kconfig +++ b/drivers/net/ethernet/intel/Kconfig | |||
@@ -25,16 +25,13 @@ config E100 | |||
25 | on the adapter. Look for a label that has a barcode and a number | 25 | on the adapter. Look for a label that has a barcode and a number |
26 | in the format 123456-001 (six digits hyphen three digits). | 26 | in the format 123456-001 (six digits hyphen three digits). |
27 | 27 | ||
28 | Use the above information and the Adapter & Driver ID Guide at: | 28 | Use the above information and the Adapter & Driver ID Guide that |
29 | can be located at: | ||
29 | 30 | ||
30 | <http://support.intel.com/support/network/adapter/pro100/21397.htm> | 31 | <http://support.intel.com> |
31 | 32 | ||
32 | to identify the adapter. | 33 | to identify the adapter. |
33 | 34 | ||
34 | For the latest Intel PRO/100 network driver for Linux, see: | ||
35 | |||
36 | <http://www.intel.com/p/en_US/support/highlights/network/pro100plus> | ||
37 | |||
38 | More specific information on configuring the driver is in | 35 | More specific information on configuring the driver is in |
39 | <file:Documentation/networking/e100.txt>. | 36 | <file:Documentation/networking/e100.txt>. |
40 | 37 | ||
@@ -47,12 +44,7 @@ config E1000 | |||
47 | ---help--- | 44 | ---help--- |
48 | This driver supports Intel(R) PRO/1000 gigabit ethernet family of | 45 | This driver supports Intel(R) PRO/1000 gigabit ethernet family of |
49 | adapters. For more information on how to identify your adapter, go | 46 | adapters. For more information on how to identify your adapter, go |
50 | to the Adapter & Driver ID Guide at: | 47 | to the Adapter & Driver ID Guide that can be located at: |
51 | |||
52 | <http://support.intel.com/support/network/adapter/pro100/21397.htm> | ||
53 | |||
54 | For general information and support, go to the Intel support | ||
55 | website at: | ||
56 | 48 | ||
57 | <http://support.intel.com> | 49 | <http://support.intel.com> |
58 | 50 | ||
@@ -71,12 +63,8 @@ config E1000E | |||
71 | This driver supports the PCI-Express Intel(R) PRO/1000 gigabit | 63 | This driver supports the PCI-Express Intel(R) PRO/1000 gigabit |
72 | ethernet family of adapters. For PCI or PCI-X e1000 adapters, | 64 | ethernet family of adapters. For PCI or PCI-X e1000 adapters, |
73 | use the regular e1000 driver For more information on how to | 65 | use the regular e1000 driver For more information on how to |
74 | identify your adapter, go to the Adapter & Driver ID Guide at: | 66 | identify your adapter, go to the Adapter & Driver ID Guide that |
75 | 67 | can be located at: | |
76 | <http://support.intel.com/support/network/adapter/pro100/21397.htm> | ||
77 | |||
78 | For general information and support, go to the Intel support | ||
79 | website at: | ||
80 | 68 | ||
81 | <http://support.intel.com> | 69 | <http://support.intel.com> |
82 | 70 | ||
@@ -101,12 +89,7 @@ config IGB | |||
101 | ---help--- | 89 | ---help--- |
102 | This driver supports Intel(R) 82575/82576 gigabit ethernet family of | 90 | This driver supports Intel(R) 82575/82576 gigabit ethernet family of |
103 | adapters. For more information on how to identify your adapter, go | 91 | adapters. For more information on how to identify your adapter, go |
104 | to the Adapter & Driver ID Guide at: | 92 | to the Adapter & Driver ID Guide that can be located at: |
105 | |||
106 | <http://support.intel.com/support/network/adapter/pro100/21397.htm> | ||
107 | |||
108 | For general information and support, go to the Intel support | ||
109 | website at: | ||
110 | 93 | ||
111 | <http://support.intel.com> | 94 | <http://support.intel.com> |
112 | 95 | ||
@@ -142,12 +125,7 @@ config IGBVF | |||
142 | ---help--- | 125 | ---help--- |
143 | This driver supports Intel(R) 82576 virtual functions. For more | 126 | This driver supports Intel(R) 82576 virtual functions. For more |
144 | information on how to identify your adapter, go to the Adapter & | 127 | information on how to identify your adapter, go to the Adapter & |
145 | Driver ID Guide at: | 128 | Driver ID Guide that can be located at: |
146 | |||
147 | <http://support.intel.com/support/network/adapter/pro100/21397.htm> | ||
148 | |||
149 | For general information and support, go to the Intel support | ||
150 | website at: | ||
151 | 129 | ||
152 | <http://support.intel.com> | 130 | <http://support.intel.com> |
153 | 131 | ||
@@ -164,12 +142,7 @@ config IXGB | |||
164 | This driver supports Intel(R) PRO/10GbE family of adapters for | 142 | This driver supports Intel(R) PRO/10GbE family of adapters for |
165 | PCI-X type cards. For PCI-E type cards, use the "ixgbe" driver | 143 | PCI-X type cards. For PCI-E type cards, use the "ixgbe" driver |
166 | instead. For more information on how to identify your adapter, go | 144 | instead. For more information on how to identify your adapter, go |
167 | to the Adapter & Driver ID Guide at: | 145 | to the Adapter & Driver ID Guide that can be located at: |
168 | |||
169 | <http://support.intel.com/support/network/adapter/pro100/21397.htm> | ||
170 | |||
171 | For general information and support, go to the Intel support | ||
172 | website at: | ||
173 | 146 | ||
174 | <http://support.intel.com> | 147 | <http://support.intel.com> |
175 | 148 | ||
@@ -187,12 +160,7 @@ config IXGBE | |||
187 | ---help--- | 160 | ---help--- |
188 | This driver supports Intel(R) 10GbE PCI Express family of | 161 | This driver supports Intel(R) 10GbE PCI Express family of |
189 | adapters. For more information on how to identify your adapter, go | 162 | adapters. For more information on how to identify your adapter, go |
190 | to the Adapter & Driver ID Guide at: | 163 | to the Adapter & Driver ID Guide that can be located at: |
191 | |||
192 | <http://support.intel.com/support/network/adapter/pro100/21397.htm> | ||
193 | |||
194 | For general information and support, go to the Intel support | ||
195 | website at: | ||
196 | 164 | ||
197 | <http://support.intel.com> | 165 | <http://support.intel.com> |
198 | 166 | ||
@@ -243,12 +211,7 @@ config IXGBEVF | |||
243 | ---help--- | 211 | ---help--- |
244 | This driver supports Intel(R) PCI Express virtual functions for the | 212 | This driver supports Intel(R) PCI Express virtual functions for the |
245 | Intel(R) ixgbe driver. For more information on how to identify your | 213 | Intel(R) ixgbe driver. For more information on how to identify your |
246 | adapter, go to the Adapter & Driver ID Guide at: | 214 | adapter, go to the Adapter & Driver ID Guide that can be located at: |
247 | |||
248 | <http://support.intel.com/support/network/sb/CS-008441.htm> | ||
249 | |||
250 | For general information and support, go to the Intel support | ||
251 | website at: | ||
252 | 215 | ||
253 | <http://support.intel.com> | 216 | <http://support.intel.com> |
254 | 217 | ||
@@ -266,12 +229,7 @@ config I40E | |||
266 | ---help--- | 229 | ---help--- |
267 | This driver supports Intel(R) Ethernet Controller XL710 Family of | 230 | This driver supports Intel(R) Ethernet Controller XL710 Family of |
268 | devices. For more information on how to identify your adapter, go | 231 | devices. For more information on how to identify your adapter, go |
269 | to the Adapter & Driver ID Guide at: | 232 | to the Adapter & Driver ID Guide that can be located at: |
270 | |||
271 | <http://support.intel.com/support/network/adapter/pro100/21397.htm> | ||
272 | |||
273 | For general information and support, go to the Intel support | ||
274 | website at: | ||
275 | 233 | ||
276 | <http://support.intel.com> | 234 | <http://support.intel.com> |
277 | 235 | ||
@@ -326,12 +284,7 @@ config I40EVF | |||
326 | ---help--- | 284 | ---help--- |
327 | This driver supports Intel(R) XL710 and X710 virtual functions. | 285 | This driver supports Intel(R) XL710 and X710 virtual functions. |
328 | For more information on how to identify your adapter, go to the | 286 | For more information on how to identify your adapter, go to the |
329 | Adapter & Driver ID Guide at: | 287 | Adapter & Driver ID Guide that can be located at: |
330 | |||
331 | <http://support.intel.com/support/network/sb/CS-008441.htm> | ||
332 | |||
333 | For general information and support, go to the Intel support | ||
334 | website at: | ||
335 | 288 | ||
336 | <http://support.intel.com> | 289 | <http://support.intel.com> |
337 | 290 | ||
@@ -347,12 +300,7 @@ config FM10K | |||
347 | ---help--- | 300 | ---help--- |
348 | This driver supports Intel(R) FM10000 Ethernet Switch Host | 301 | This driver supports Intel(R) FM10000 Ethernet Switch Host |
349 | Interface. For more information on how to identify your adapter, | 302 | Interface. For more information on how to identify your adapter, |
350 | go to the Adapter & Driver ID Guide at: | 303 | go to the Adapter & Driver ID Guide that can be located at: |
351 | |||
352 | <http://support.intel.com/support/network/sb/CS-008441.htm> | ||
353 | |||
354 | For general information and support, go to the Intel support | ||
355 | website at: | ||
356 | 304 | ||
357 | <http://support.intel.com> | 305 | <http://support.intel.com> |
358 | 306 | ||
diff --git a/drivers/net/ethernet/intel/e1000/e1000.h b/drivers/net/ethernet/intel/e1000/e1000.h index 98fe5a2cd6e3..d7bdea79e9fa 100644 --- a/drivers/net/ethernet/intel/e1000/e1000.h +++ b/drivers/net/ethernet/intel/e1000/e1000.h | |||
@@ -358,6 +358,8 @@ struct net_device *e1000_get_hw_dev(struct e1000_hw *hw); | |||
358 | extern char e1000_driver_name[]; | 358 | extern char e1000_driver_name[]; |
359 | extern const char e1000_driver_version[]; | 359 | extern const char e1000_driver_version[]; |
360 | 360 | ||
361 | int e1000_open(struct net_device *netdev); | ||
362 | int e1000_close(struct net_device *netdev); | ||
361 | int e1000_up(struct e1000_adapter *adapter); | 363 | int e1000_up(struct e1000_adapter *adapter); |
362 | void e1000_down(struct e1000_adapter *adapter); | 364 | void e1000_down(struct e1000_adapter *adapter); |
363 | void e1000_reinit_locked(struct e1000_adapter *adapter); | 365 | void e1000_reinit_locked(struct e1000_adapter *adapter); |
diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c index 83e557c7f279..975eeb885ca2 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c +++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c | |||
@@ -1553,7 +1553,7 @@ static void e1000_diag_test(struct net_device *netdev, | |||
1553 | 1553 | ||
1554 | if (if_running) | 1554 | if (if_running) |
1555 | /* indicate we're in test mode */ | 1555 | /* indicate we're in test mode */ |
1556 | dev_close(netdev); | 1556 | e1000_close(netdev); |
1557 | else | 1557 | else |
1558 | e1000_reset(adapter); | 1558 | e1000_reset(adapter); |
1559 | 1559 | ||
@@ -1582,7 +1582,7 @@ static void e1000_diag_test(struct net_device *netdev, | |||
1582 | e1000_reset(adapter); | 1582 | e1000_reset(adapter); |
1583 | clear_bit(__E1000_TESTING, &adapter->flags); | 1583 | clear_bit(__E1000_TESTING, &adapter->flags); |
1584 | if (if_running) | 1584 | if (if_running) |
1585 | dev_open(netdev); | 1585 | e1000_open(netdev); |
1586 | } else { | 1586 | } else { |
1587 | e_info(hw, "online testing starting\n"); | 1587 | e_info(hw, "online testing starting\n"); |
1588 | /* Online tests */ | 1588 | /* Online tests */ |
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index 3fc7bde699ba..6de0c7df56fa 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c | |||
@@ -114,8 +114,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent); | |||
114 | static void e1000_remove(struct pci_dev *pdev); | 114 | static void e1000_remove(struct pci_dev *pdev); |
115 | static int e1000_alloc_queues(struct e1000_adapter *adapter); | 115 | static int e1000_alloc_queues(struct e1000_adapter *adapter); |
116 | static int e1000_sw_init(struct e1000_adapter *adapter); | 116 | static int e1000_sw_init(struct e1000_adapter *adapter); |
117 | static int e1000_open(struct net_device *netdev); | 117 | int e1000_open(struct net_device *netdev); |
118 | static int e1000_close(struct net_device *netdev); | 118 | int e1000_close(struct net_device *netdev); |
119 | static void e1000_configure_tx(struct e1000_adapter *adapter); | 119 | static void e1000_configure_tx(struct e1000_adapter *adapter); |
120 | static void e1000_configure_rx(struct e1000_adapter *adapter); | 120 | static void e1000_configure_rx(struct e1000_adapter *adapter); |
121 | static void e1000_setup_rctl(struct e1000_adapter *adapter); | 121 | static void e1000_setup_rctl(struct e1000_adapter *adapter); |
@@ -1360,7 +1360,7 @@ static int e1000_alloc_queues(struct e1000_adapter *adapter) | |||
1360 | * handler is registered with the OS, the watchdog task is started, | 1360 | * handler is registered with the OS, the watchdog task is started, |
1361 | * and the stack is notified that the interface is ready. | 1361 | * and the stack is notified that the interface is ready. |
1362 | **/ | 1362 | **/ |
1363 | static int e1000_open(struct net_device *netdev) | 1363 | int e1000_open(struct net_device *netdev) |
1364 | { | 1364 | { |
1365 | struct e1000_adapter *adapter = netdev_priv(netdev); | 1365 | struct e1000_adapter *adapter = netdev_priv(netdev); |
1366 | struct e1000_hw *hw = &adapter->hw; | 1366 | struct e1000_hw *hw = &adapter->hw; |
@@ -1437,7 +1437,7 @@ err_setup_tx: | |||
1437 | * needs to be disabled. A global MAC reset is issued to stop the | 1437 | * needs to be disabled. A global MAC reset is issued to stop the |
1438 | * hardware, and all transmit and receive resources are freed. | 1438 | * hardware, and all transmit and receive resources are freed. |
1439 | **/ | 1439 | **/ |
1440 | static int e1000_close(struct net_device *netdev) | 1440 | int e1000_close(struct net_device *netdev) |
1441 | { | 1441 | { |
1442 | struct e1000_adapter *adapter = netdev_priv(netdev); | 1442 | struct e1000_adapter *adapter = netdev_priv(netdev); |
1443 | struct e1000_hw *hw = &adapter->hw; | 1443 | struct e1000_hw *hw = &adapter->hw; |
diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h index 1dc293bad87b..52eb641fc9dc 100644 --- a/drivers/net/ethernet/intel/e1000e/e1000.h +++ b/drivers/net/ethernet/intel/e1000e/e1000.h | |||
@@ -480,6 +480,8 @@ extern const char e1000e_driver_version[]; | |||
480 | void e1000e_check_options(struct e1000_adapter *adapter); | 480 | void e1000e_check_options(struct e1000_adapter *adapter); |
481 | void e1000e_set_ethtool_ops(struct net_device *netdev); | 481 | void e1000e_set_ethtool_ops(struct net_device *netdev); |
482 | 482 | ||
483 | int e1000e_open(struct net_device *netdev); | ||
484 | int e1000e_close(struct net_device *netdev); | ||
483 | void e1000e_up(struct e1000_adapter *adapter); | 485 | void e1000e_up(struct e1000_adapter *adapter); |
484 | void e1000e_down(struct e1000_adapter *adapter, bool reset); | 486 | void e1000e_down(struct e1000_adapter *adapter, bool reset); |
485 | void e1000e_reinit_locked(struct e1000_adapter *adapter); | 487 | void e1000e_reinit_locked(struct e1000_adapter *adapter); |
diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c index 6cab1f30d41e..1e3973aa707c 100644 --- a/drivers/net/ethernet/intel/e1000e/ethtool.c +++ b/drivers/net/ethernet/intel/e1000e/ethtool.c | |||
@@ -1816,7 +1816,7 @@ static void e1000_diag_test(struct net_device *netdev, | |||
1816 | 1816 | ||
1817 | if (if_running) | 1817 | if (if_running) |
1818 | /* indicate we're in test mode */ | 1818 | /* indicate we're in test mode */ |
1819 | dev_close(netdev); | 1819 | e1000e_close(netdev); |
1820 | 1820 | ||
1821 | if (e1000_reg_test(adapter, &data[0])) | 1821 | if (e1000_reg_test(adapter, &data[0])) |
1822 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1822 | eth_test->flags |= ETH_TEST_FL_FAILED; |
@@ -1849,7 +1849,7 @@ static void e1000_diag_test(struct net_device *netdev, | |||
1849 | 1849 | ||
1850 | clear_bit(__E1000_TESTING, &adapter->state); | 1850 | clear_bit(__E1000_TESTING, &adapter->state); |
1851 | if (if_running) | 1851 | if (if_running) |
1852 | dev_open(netdev); | 1852 | e1000e_open(netdev); |
1853 | } else { | 1853 | } else { |
1854 | /* Online tests */ | 1854 | /* Online tests */ |
1855 | 1855 | ||
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 9b4ec13d9161..a7f16c35ebcd 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | |||
@@ -4495,7 +4495,7 @@ static int e1000_test_msi(struct e1000_adapter *adapter) | |||
4495 | } | 4495 | } |
4496 | 4496 | ||
4497 | /** | 4497 | /** |
4498 | * e1000_open - Called when a network interface is made active | 4498 | * e1000e_open - Called when a network interface is made active |
4499 | * @netdev: network interface device structure | 4499 | * @netdev: network interface device structure |
4500 | * | 4500 | * |
4501 | * Returns 0 on success, negative value on failure | 4501 | * Returns 0 on success, negative value on failure |
@@ -4506,7 +4506,7 @@ static int e1000_test_msi(struct e1000_adapter *adapter) | |||
4506 | * handler is registered with the OS, the watchdog timer is started, | 4506 | * handler is registered with the OS, the watchdog timer is started, |
4507 | * and the stack is notified that the interface is ready. | 4507 | * and the stack is notified that the interface is ready. |
4508 | **/ | 4508 | **/ |
4509 | static int e1000_open(struct net_device *netdev) | 4509 | int e1000e_open(struct net_device *netdev) |
4510 | { | 4510 | { |
4511 | struct e1000_adapter *adapter = netdev_priv(netdev); | 4511 | struct e1000_adapter *adapter = netdev_priv(netdev); |
4512 | struct e1000_hw *hw = &adapter->hw; | 4512 | struct e1000_hw *hw = &adapter->hw; |
@@ -4604,7 +4604,7 @@ err_setup_tx: | |||
4604 | } | 4604 | } |
4605 | 4605 | ||
4606 | /** | 4606 | /** |
4607 | * e1000_close - Disables a network interface | 4607 | * e1000e_close - Disables a network interface |
4608 | * @netdev: network interface device structure | 4608 | * @netdev: network interface device structure |
4609 | * | 4609 | * |
4610 | * Returns 0, this is not allowed to fail | 4610 | * Returns 0, this is not allowed to fail |
@@ -4614,7 +4614,7 @@ err_setup_tx: | |||
4614 | * needs to be disabled. A global MAC reset is issued to stop the | 4614 | * needs to be disabled. A global MAC reset is issued to stop the |
4615 | * hardware, and all transmit and receive resources are freed. | 4615 | * hardware, and all transmit and receive resources are freed. |
4616 | **/ | 4616 | **/ |
4617 | static int e1000_close(struct net_device *netdev) | 4617 | int e1000e_close(struct net_device *netdev) |
4618 | { | 4618 | { |
4619 | struct e1000_adapter *adapter = netdev_priv(netdev); | 4619 | struct e1000_adapter *adapter = netdev_priv(netdev); |
4620 | struct pci_dev *pdev = adapter->pdev; | 4620 | struct pci_dev *pdev = adapter->pdev; |
@@ -6920,8 +6920,8 @@ static int e1000_set_features(struct net_device *netdev, | |||
6920 | } | 6920 | } |
6921 | 6921 | ||
6922 | static const struct net_device_ops e1000e_netdev_ops = { | 6922 | static const struct net_device_ops e1000e_netdev_ops = { |
6923 | .ndo_open = e1000_open, | 6923 | .ndo_open = e1000e_open, |
6924 | .ndo_stop = e1000_close, | 6924 | .ndo_stop = e1000e_close, |
6925 | .ndo_start_xmit = e1000_xmit_frame, | 6925 | .ndo_start_xmit = e1000_xmit_frame, |
6926 | .ndo_get_stats64 = e1000e_get_stats64, | 6926 | .ndo_get_stats64 = e1000e_get_stats64, |
6927 | .ndo_set_rx_mode = e1000e_set_rx_mode, | 6927 | .ndo_set_rx_mode = e1000e_set_rx_mode, |
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index 7982243d1f9b..bb4d6cdcd0b8 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c | |||
@@ -2831,7 +2831,8 @@ static int igb_get_module_eeprom(struct net_device *netdev, | |||
2831 | 2831 | ||
2832 | /* Read EEPROM block, SFF-8079/SFF-8472, word at a time */ | 2832 | /* Read EEPROM block, SFF-8079/SFF-8472, word at a time */ |
2833 | for (i = 0; i < last_word - first_word + 1; i++) { | 2833 | for (i = 0; i < last_word - first_word + 1; i++) { |
2834 | status = igb_read_phy_reg_i2c(hw, first_word + i, &dataword[i]); | 2834 | status = igb_read_phy_reg_i2c(hw, (first_word + i) * 2, |
2835 | &dataword[i]); | ||
2835 | if (status) { | 2836 | if (status) { |
2836 | /* Error occurred while reading module */ | 2837 | /* Error occurred while reading module */ |
2837 | kfree(dataword); | 2838 | kfree(dataword); |
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 55a1405cb2a1..8e96c35307fb 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/aer.h> | 50 | #include <linux/aer.h> |
51 | #include <linux/prefetch.h> | 51 | #include <linux/prefetch.h> |
52 | #include <linux/pm_runtime.h> | 52 | #include <linux/pm_runtime.h> |
53 | #include <linux/etherdevice.h> | ||
53 | #ifdef CONFIG_IGB_DCA | 54 | #ifdef CONFIG_IGB_DCA |
54 | #include <linux/dca.h> | 55 | #include <linux/dca.h> |
55 | #endif | 56 | #endif |
@@ -150,7 +151,7 @@ static void igb_update_dca(struct igb_q_vector *); | |||
150 | static void igb_setup_dca(struct igb_adapter *); | 151 | static void igb_setup_dca(struct igb_adapter *); |
151 | #endif /* CONFIG_IGB_DCA */ | 152 | #endif /* CONFIG_IGB_DCA */ |
152 | static int igb_poll(struct napi_struct *, int); | 153 | static int igb_poll(struct napi_struct *, int); |
153 | static bool igb_clean_tx_irq(struct igb_q_vector *); | 154 | static bool igb_clean_tx_irq(struct igb_q_vector *, int); |
154 | static int igb_clean_rx_irq(struct igb_q_vector *, int); | 155 | static int igb_clean_rx_irq(struct igb_q_vector *, int); |
155 | static int igb_ioctl(struct net_device *, struct ifreq *, int cmd); | 156 | static int igb_ioctl(struct net_device *, struct ifreq *, int cmd); |
156 | static void igb_tx_timeout(struct net_device *); | 157 | static void igb_tx_timeout(struct net_device *); |
@@ -2442,9 +2443,11 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2442 | break; | 2443 | break; |
2443 | } | 2444 | } |
2444 | 2445 | ||
2445 | /* copy the MAC address out of the NVM */ | 2446 | if (eth_platform_get_mac_address(&pdev->dev, hw->mac.addr)) { |
2446 | if (hw->mac.ops.read_mac_addr(hw)) | 2447 | /* copy the MAC address out of the NVM */ |
2447 | dev_err(&pdev->dev, "NVM Read Error\n"); | 2448 | if (hw->mac.ops.read_mac_addr(hw)) |
2449 | dev_err(&pdev->dev, "NVM Read Error\n"); | ||
2450 | } | ||
2448 | 2451 | ||
2449 | memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len); | 2452 | memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len); |
2450 | 2453 | ||
@@ -6522,13 +6525,14 @@ static int igb_poll(struct napi_struct *napi, int budget) | |||
6522 | igb_update_dca(q_vector); | 6525 | igb_update_dca(q_vector); |
6523 | #endif | 6526 | #endif |
6524 | if (q_vector->tx.ring) | 6527 | if (q_vector->tx.ring) |
6525 | clean_complete = igb_clean_tx_irq(q_vector); | 6528 | clean_complete = igb_clean_tx_irq(q_vector, budget); |
6526 | 6529 | ||
6527 | if (q_vector->rx.ring) { | 6530 | if (q_vector->rx.ring) { |
6528 | int cleaned = igb_clean_rx_irq(q_vector, budget); | 6531 | int cleaned = igb_clean_rx_irq(q_vector, budget); |
6529 | 6532 | ||
6530 | work_done += cleaned; | 6533 | work_done += cleaned; |
6531 | clean_complete &= (cleaned < budget); | 6534 | if (cleaned >= budget) |
6535 | clean_complete = false; | ||
6532 | } | 6536 | } |
6533 | 6537 | ||
6534 | /* If all work not completed, return budget and keep polling */ | 6538 | /* If all work not completed, return budget and keep polling */ |
@@ -6545,10 +6549,11 @@ static int igb_poll(struct napi_struct *napi, int budget) | |||
6545 | /** | 6549 | /** |
6546 | * igb_clean_tx_irq - Reclaim resources after transmit completes | 6550 | * igb_clean_tx_irq - Reclaim resources after transmit completes |
6547 | * @q_vector: pointer to q_vector containing needed info | 6551 | * @q_vector: pointer to q_vector containing needed info |
6552 | * @napi_budget: Used to determine if we are in netpoll | ||
6548 | * | 6553 | * |
6549 | * returns true if ring is completely cleaned | 6554 | * returns true if ring is completely cleaned |
6550 | **/ | 6555 | **/ |
6551 | static bool igb_clean_tx_irq(struct igb_q_vector *q_vector) | 6556 | static bool igb_clean_tx_irq(struct igb_q_vector *q_vector, int napi_budget) |
6552 | { | 6557 | { |
6553 | struct igb_adapter *adapter = q_vector->adapter; | 6558 | struct igb_adapter *adapter = q_vector->adapter; |
6554 | struct igb_ring *tx_ring = q_vector->tx.ring; | 6559 | struct igb_ring *tx_ring = q_vector->tx.ring; |
@@ -6587,7 +6592,7 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector) | |||
6587 | total_packets += tx_buffer->gso_segs; | 6592 | total_packets += tx_buffer->gso_segs; |
6588 | 6593 | ||
6589 | /* free the skb */ | 6594 | /* free the skb */ |
6590 | dev_consume_skb_any(tx_buffer->skb); | 6595 | napi_consume_skb(tx_buffer->skb, napi_budget); |
6591 | 6596 | ||
6592 | /* unmap skb header data */ | 6597 | /* unmap skb header data */ |
6593 | dma_unmap_single(tx_ring->dev, | 6598 | dma_unmap_single(tx_ring->dev, |
@@ -7574,7 +7579,6 @@ static int igb_resume(struct device *dev) | |||
7574 | 7579 | ||
7575 | if (igb_init_interrupt_scheme(adapter, true)) { | 7580 | if (igb_init_interrupt_scheme(adapter, true)) { |
7576 | dev_err(&pdev->dev, "Unable to allocate memory for queues\n"); | 7581 | dev_err(&pdev->dev, "Unable to allocate memory for queues\n"); |
7577 | rtnl_unlock(); | ||
7578 | return -ENOMEM; | 7582 | return -ENOMEM; |
7579 | } | 7583 | } |
7580 | 7584 | ||
@@ -7845,11 +7849,13 @@ static void igb_rar_set_qsel(struct igb_adapter *adapter, u8 *addr, u32 index, | |||
7845 | struct e1000_hw *hw = &adapter->hw; | 7849 | struct e1000_hw *hw = &adapter->hw; |
7846 | u32 rar_low, rar_high; | 7850 | u32 rar_low, rar_high; |
7847 | 7851 | ||
7848 | /* HW expects these in little endian so we reverse the byte order | 7852 | /* HW expects these to be in network order when they are plugged |
7849 | * from network order (big endian) to CPU endian | 7853 | * into the registers which are little endian. In order to guarantee |
7854 | * that ordering we need to do an leXX_to_cpup here in order to be | ||
7855 | * ready for the byteswap that occurs with writel | ||
7850 | */ | 7856 | */ |
7851 | rar_low = le32_to_cpup((__be32 *)(addr)); | 7857 | rar_low = le32_to_cpup((__le32 *)(addr)); |
7852 | rar_high = le16_to_cpup((__be16 *)(addr + 4)); | 7858 | rar_high = le16_to_cpup((__le16 *)(addr + 4)); |
7853 | 7859 | ||
7854 | /* Indicate to hardware the Address is Valid. */ | 7860 | /* Indicate to hardware the Address is Valid. */ |
7855 | rar_high |= E1000_RAH_AV; | 7861 | rar_high |= E1000_RAH_AV; |