]> www.infradead.org Git - users/jedix/linux-maple.git/commit
e1000: call ndo_stop() instead of dev_close() when running offline selftest
authorStefan Assmann <sassmann@kpanic.de>
Wed, 3 Feb 2016 08:20:51 +0000 (09:20 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 22 Jun 2017 06:24:39 +0000 (23:24 -0700)
commitc7d725288104e9b827208b0fdd5fcee1cc98c03b
treedf495c575362532b723deab17632546d6cf271e0
parent6950ab26ec58288728f5472b30c6c5a6d3a862e9
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>
Orabug: 26243014
(cherry picked from commit 1f2f83f838489d386ecad9d0c77c3d6ec983102c)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/net/ethernet/intel/e1000/e1000.h
drivers/net/ethernet/intel/e1000/e1000_ethtool.c
drivers/net/ethernet/intel/e1000/e1000_main.c