summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgb
diff options
context:
space:
mode:
authorEliezer Tamir <eliezer.tamir@linux.intel.com>2015-03-20 17:41:52 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-03-20 17:41:52 -0700
commitd9d888b8b089edae99e40ab3f36d09ca1e592197 (patch)
tree8311dff36e907c1cd8202a0c37fa8fc19e5f6323 /drivers/net/ethernet/intel/ixgb
parentf6877fcf229b4e3d396cbd5199e040b4ea1362eb (diff)
downloadtalos-obmc-linux-d9d888b8b089edae99e40ab3f36d09ca1e592197.tar.gz
talos-obmc-linux-d9d888b8b089edae99e40ab3f36d09ca1e592197.zip
ixgb: call netif_carrier_off early on down
When bringing down an interface netif_carrier_off() should be one the first things we do, since this will prevent the stack from queuing more packets to this interface. This operation is very fast, and should make the device behave much nicer when trying to bring down an interface under load. Also, this would Do The Right Thing (TM) if this device has some sort of fail-over teaming and redirect traffic to the other IF. Move netif_carrier_off as early as possible. Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgb')
-rw-r--r--drivers/net/ethernet/intel/ixgb/ixgb_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
index 11a1bdbe3fd9..31f91459312f 100644
--- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c
+++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
@@ -285,6 +285,8 @@ ixgb_down(struct ixgb_adapter *adapter, bool kill_watchdog)
/* prevent the interrupt handler from restarting watchdog */
set_bit(__IXGB_DOWN, &adapter->flags);
+ netif_carrier_off(netdev);
+
napi_disable(&adapter->napi);
/* waiting for NAPI to complete can re-enable interrupts */
ixgb_irq_disable(adapter);
@@ -298,7 +300,6 @@ ixgb_down(struct ixgb_adapter *adapter, bool kill_watchdog)
adapter->link_speed = 0;
adapter->link_duplex = 0;
- netif_carrier_off(netdev);
netif_stop_queue(netdev);
ixgb_reset(adapter);
OpenPOWER on IntegriCloud