Skip to content

Commit df814d9

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-03-20 This series contains updates to ixgb, e1000e, igb and igbvf. Eliezer and Todd provide patches to fix a potential issue found during code inspection. When bringing down an interface netif_carrier_off() should be one of the first things we do, since this will prevent the stack from queueing more packets to this interface. Yanir provides a fix for e1000e that was found in validating i219, where the call to e1000e_write_protect_nvm_ich8lan() is no longer supported in newer hardware. Access to these registers causes a system freeze in early steppings and is ignored in later steppings. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents c6f1507 + 784401b commit df814d9

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

drivers/net/ethernet/intel/e1000e/netdev.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4084,6 +4084,8 @@ void e1000e_down(struct e1000_adapter *adapter, bool reset)
40844084
*/
40854085
set_bit(__E1000_DOWN, &adapter->state);
40864086

4087+
netif_carrier_off(netdev);
4088+
40874089
/* disable receives in the hardware */
40884090
rctl = er32(RCTL);
40894091
if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX))
@@ -4108,8 +4110,6 @@ void e1000e_down(struct e1000_adapter *adapter, bool reset)
41084110
del_timer_sync(&adapter->watchdog_timer);
41094111
del_timer_sync(&adapter->phy_info_timer);
41104112

4111-
netif_carrier_off(netdev);
4112-
41134113
spin_lock(&adapter->stats64_lock);
41144114
e1000e_update_stats(adapter);
41154115
spin_unlock(&adapter->stats64_lock);
@@ -6874,7 +6874,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
68746874
goto err_hw_init;
68756875

68766876
if ((adapter->flags & FLAG_IS_ICH) &&
6877-
(adapter->flags & FLAG_READ_ONLY_NVM))
6877+
(adapter->flags & FLAG_READ_ONLY_NVM) &&
6878+
(hw->mac.type < e1000_pch_spt))
68786879
e1000e_write_protect_nvm_ich8lan(&adapter->hw);
68796880

68806881
hw->mac.ops.get_bus_info(&adapter->hw);

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,6 +1776,7 @@ void igb_down(struct igb_adapter *adapter)
17761776
wr32(E1000_RCTL, rctl & ~E1000_RCTL_EN);
17771777
/* flush and sleep below */
17781778

1779+
netif_carrier_off(netdev);
17791780
netif_tx_stop_all_queues(netdev);
17801781

17811782
/* disable transmits in the hardware */
@@ -1797,12 +1798,9 @@ void igb_down(struct igb_adapter *adapter)
17971798
}
17981799
}
17991800

1800-
18011801
del_timer_sync(&adapter->watchdog_timer);
18021802
del_timer_sync(&adapter->phy_info_timer);
18031803

1804-
netif_carrier_off(netdev);
1805-
18061804
/* record the stats before reset*/
18071805
spin_lock(&adapter->stats64_lock);
18081806
igb_update_stats(adapter, &adapter->stats64);

drivers/net/ethernet/intel/igbvf/netdev.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,7 @@ void igbvf_down(struct igbvf_adapter *adapter)
15191519
rxdctl = er32(RXDCTL(0));
15201520
ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE);
15211521

1522+
netif_carrier_off(netdev);
15221523
netif_stop_queue(netdev);
15231524

15241525
/* disable transmits in the hardware */
@@ -1535,8 +1536,6 @@ void igbvf_down(struct igbvf_adapter *adapter)
15351536

15361537
del_timer_sync(&adapter->watchdog_timer);
15371538

1538-
netif_carrier_off(netdev);
1539-
15401539
/* record the stats before reset*/
15411540
igbvf_update_stats(adapter);
15421541

drivers/net/ethernet/intel/ixgb/ixgb_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ ixgb_down(struct ixgb_adapter *adapter, bool kill_watchdog)
285285
/* prevent the interrupt handler from restarting watchdog */
286286
set_bit(__IXGB_DOWN, &adapter->flags);
287287

288+
netif_carrier_off(netdev);
289+
288290
napi_disable(&adapter->napi);
289291
/* waiting for NAPI to complete can re-enable interrupts */
290292
ixgb_irq_disable(adapter);
@@ -298,7 +300,6 @@ ixgb_down(struct ixgb_adapter *adapter, bool kill_watchdog)
298300

299301
adapter->link_speed = 0;
300302
adapter->link_duplex = 0;
301-
netif_carrier_off(netdev);
302303
netif_stop_queue(netdev);
303304

304305
ixgb_reset(adapter);

0 commit comments

Comments
 (0)