]> git.baikalelectronics.ru Git - kernel.git/commit
e1000: Do not perform reset in reset_task if we are already down
authorAlexander Duyck <alexander.h.duyck@linux.intel.com>
Fri, 17 Apr 2020 16:35:31 +0000 (09:35 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 21 May 2020 23:18:42 +0000 (16:18 -0700)
commitad889ef24b72ef2fe0dc62fcc23f3a6a3f63fc9a
tree1e1cb2b0ae673a0c85864f77408370c8dbfc44b1
parent53212e636dd23d9953030ce784be9b039c6891c5
e1000: Do not perform reset in reset_task if we are already down

We are seeing a deadlock in e1000 down when NAPI is being disabled. Looking
over the kernel function trace of the system it appears that the interface
is being closed and then a reset is hitting which deadlocks the interface
as the NAPI interface is already disabled.

To prevent this from happening I am disabling the reset task when
__E1000_DOWN is already set. In addition code has been added so that we set
the __E1000_DOWN while holding the __E1000_RESET flag in e1000_close in
order to guarantee that the reset task will not run after we have started
the close call.

Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Tested-by: Maxim Zhukov <mussitantesmortem@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000/e1000_main.c