aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
diff options
context:
space:
mode:
authorStefan Assmann <sassmann@kpanic.de>2016-02-03 03:20:51 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-04-06 17:47:55 -0400
commit1f2f83f838489d386ecad9d0c77c3d6ec983102c (patch)
treecbcc2ddc85f5baf6eb08a755c813ed2fb3046b44 /drivers/net/ethernet/intel/e1000/e1000_ethtool.c
parentd5ea45da1f04a3443710306e16db3b3aeae92918 (diff)
e1000: call ndo_stop() instead of dev_close() when running offline selftest
Calling dev_close() causes IFF_UP to be cleared which will remove the interfaces routes and some addresses. That's probably not what the user intended when running the offline selftest. Besides this does not happen if the interface is brought down before the test, so the current behaviour is inconsistent. Instead call the net_device_ops ndo_stop function directly and avoid touching IFF_UP at all. Signed-off-by: Stefan Assmann <sassmann@kpanic.de> 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_ethtool.c')
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_ethtool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
index 83e557c7f279..975eeb885ca2 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
@@ -1553,7 +1553,7 @@ static void e1000_diag_test(struct net_device *netdev,
1553 1553
1554 if (if_running) 1554 if (if_running)
1555 /* indicate we're in test mode */ 1555 /* indicate we're in test mode */
1556 dev_close(netdev); 1556 e1000_close(netdev);
1557 else 1557 else
1558 e1000_reset(adapter); 1558 e1000_reset(adapter);
1559 1559
@@ -1582,7 +1582,7 @@ static void e1000_diag_test(struct net_device *netdev,
1582 e1000_reset(adapter); 1582 e1000_reset(adapter);
1583 clear_bit(__E1000_TESTING, &adapter->flags); 1583 clear_bit(__E1000_TESTING, &adapter->flags);
1584 if (if_running) 1584 if (if_running)
1585 dev_open(netdev); 1585 e1000_open(netdev);
1586 } else { 1586 } else {
1587 e_info(hw, "online testing starting\n"); 1587 e_info(hw, "online testing starting\n");
1588 /* Online tests */ 1588 /* Online tests */