Commit f28ea083 authored by Todd Fujinaka's avatar Todd Fujinaka Committed by Jeff Kirsher

igb: use netif_carrier_off earlier when bringing if down

Use netif_carrier_off() first, since that will prevent the stack from
queuing more packets to this IF. This operation is fast, and should
behave much nicer when trying to bring down an interface under load.
Reported-by: default avatarEliezer Tamir <eliezer.tamir@linux.intel.com>
Signed-off-by: default avatarTodd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 152c0a97
...@@ -1776,6 +1776,7 @@ void igb_down(struct igb_adapter *adapter) ...@@ -1776,6 +1776,7 @@ void igb_down(struct igb_adapter *adapter)
wr32(E1000_RCTL, rctl & ~E1000_RCTL_EN); wr32(E1000_RCTL, rctl & ~E1000_RCTL_EN);
/* flush and sleep below */ /* flush and sleep below */
netif_carrier_off(netdev);
netif_tx_stop_all_queues(netdev); netif_tx_stop_all_queues(netdev);
/* disable transmits in the hardware */ /* disable transmits in the hardware */
...@@ -1797,12 +1798,9 @@ void igb_down(struct igb_adapter *adapter) ...@@ -1797,12 +1798,9 @@ void igb_down(struct igb_adapter *adapter)
} }
} }
del_timer_sync(&adapter->watchdog_timer); del_timer_sync(&adapter->watchdog_timer);
del_timer_sync(&adapter->phy_info_timer); del_timer_sync(&adapter->phy_info_timer);
netif_carrier_off(netdev);
/* record the stats before reset*/ /* record the stats before reset*/
spin_lock(&adapter->stats64_lock); spin_lock(&adapter->stats64_lock);
igb_update_stats(adapter, &adapter->stats64); igb_update_stats(adapter, &adapter->stats64);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment