aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_main.c
diff options
context:
space:
mode:
authorStefan Assmann <sassmann@kpanic.de>2016-02-03 03:20:50 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-02-24 18:54:39 -0500
commit46eafa59e18d034ba616fdcca688c388d0bbfd91 (patch)
tree8526c307774b1249b559a476c35b906354a8ff26 /drivers/net/ethernet/intel/igb/igb_main.c
parent030f9f52642a20cbd8c1334a237e92e3ef55e2b1 (diff)
igb: 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/igb/igb_main.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 3b56f809967c..834b1b6a9277 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -122,8 +122,8 @@ static void igb_setup_mrqc(struct igb_adapter *);
122static int igb_probe(struct pci_dev *, const struct pci_device_id *); 122static int igb_probe(struct pci_dev *, const struct pci_device_id *);
123static void igb_remove(struct pci_dev *pdev); 123static void igb_remove(struct pci_dev *pdev);
124static int igb_sw_init(struct igb_adapter *); 124static int igb_sw_init(struct igb_adapter *);
125static int igb_open(struct net_device *); 125int igb_open(struct net_device *);
126static int igb_close(struct net_device *); 126int igb_close(struct net_device *);
127static void igb_configure(struct igb_adapter *); 127static void igb_configure(struct igb_adapter *);
128static void igb_configure_tx(struct igb_adapter *); 128static void igb_configure_tx(struct igb_adapter *);
129static void igb_configure_rx(struct igb_adapter *); 129static void igb_configure_rx(struct igb_adapter *);
@@ -3172,7 +3172,7 @@ err_setup_tx:
3172 return err; 3172 return err;
3173} 3173}
3174 3174
3175static int igb_open(struct net_device *netdev) 3175int igb_open(struct net_device *netdev)
3176{ 3176{
3177 return __igb_open(netdev, false); 3177 return __igb_open(netdev, false);
3178} 3178}
@@ -3209,7 +3209,7 @@ static int __igb_close(struct net_device *netdev, bool suspending)
3209 return 0; 3209 return 0;
3210} 3210}
3211 3211
3212static int igb_close(struct net_device *netdev) 3212int igb_close(struct net_device *netdev)
3213{ 3213{
3214 return __igb_close(netdev, false); 3214 return __igb_close(netdev, false);
3215} 3215}