]> git.baikalelectronics.ru Git - kernel.git/commit
igb: call ndo_stop() instead of dev_close() when running offline selftest
authorStefan Assmann <sassmann@kpanic.de>
Wed, 3 Feb 2016 08:20:50 +0000 (09:20 +0100)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 24 Feb 2016 23:54:39 +0000 (15:54 -0800)
commit4cfbfe9cc55882933b0e4fd6d5f8fba5de223a2b
tree8526c307774b1249b559a476c35b906354a8ff26
parent8a7ff18c05e4406554c91c177c28d41f5db6b257
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>
drivers/net/ethernet/intel/igb/igb.h
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igb/igb_main.c