summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Fujinaka <todd.fujinaka@intel.com>2015-03-21 01:41:54 +0100
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-03-21 01:45:12 +0100
commit784401bfc0b22b5521492047884e8d834de4dfab (patch)
tree361d74098296cab17a2727d79e39ed61dd43d68d
parentigb: use netif_carrier_off earlier when bringing if down (diff)
downloadlinux-784401bfc0b22b5521492047884e8d834de4dfab.tar.xz
linux-784401bfc0b22b5521492047884e8d834de4dfab.zip
igbvf: 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: Eliezer Tamir <eliezer.tamir@linux.intel.com> Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/igbvf/netdev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index c17ea4b8f84d..95af14e139d7 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -1519,6 +1519,7 @@ void igbvf_down(struct igbvf_adapter *adapter)
rxdctl = er32(RXDCTL(0));
ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE);
+ netif_carrier_off(netdev);
netif_stop_queue(netdev);
/* disable transmits in the hardware */
@@ -1535,8 +1536,6 @@ void igbvf_down(struct igbvf_adapter *adapter)
del_timer_sync(&adapter->watchdog_timer);
- netif_carrier_off(netdev);
-
/* record the stats before reset*/
igbvf_update_stats(adapter);