summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/e1000/e1000_main.c
diff options
context:
space:
mode:
authorEliezer Tamir <eliezer.tamir@linux.intel.com>2015-02-25 15:52:49 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-03-06 02:47:10 -0800
commitf9c029db70880a66cf03c34aa6d4d5c9b2d13281 (patch)
treeb3fdfbc21687b8f9f92ccccfe60daefeb51d5ea3 /drivers/net/ethernet/intel/e1000/e1000_main.c
parentb23c0cc5e8b7c31f831c03b74f8e79c958c41d1e (diff)
downloadblackbird-op-linux-f9c029db70880a66cf03c34aa6d4d5c9b2d13281.tar.gz
blackbird-op-linux-f9c029db70880a66cf03c34aa6d4d5c9b2d13281.zip
e1000: 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> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/e1000/e1000_main.c')
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 7f997d36948f..26dcb44ea0c8 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -516,6 +516,7 @@ void e1000_down(struct e1000_adapter *adapter)
struct net_device *netdev = adapter->netdev;
u32 rctl, tctl;
+ netif_carrier_off(netdev);
/* disable receives in the hardware */
rctl = er32(RCTL);
@@ -544,7 +545,6 @@ void e1000_down(struct e1000_adapter *adapter)
adapter->link_speed = 0;
adapter->link_duplex = 0;
- netif_carrier_off(netdev);
e1000_reset(adapter);
e1000_clean_all_tx_rings(adapter);
OpenPOWER on IntegriCloud