summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Dave <tushar.n.dave@intel.com>2012-05-17 01:04:50 +0000
committerBen Hutchings <ben@decadent.org.uk>2012-05-20 22:56:52 +0100
commit3a58107e4ed76e3a314002233a600234e0785aa1 (patch)
treec1060b53dfbf733529c7d6374ad5cdd41f99af7b
parentaa3edb47d5f969b63b42c5757c663b765d8a5d86 (diff)
downloadlwn-3a58107e4ed76e3a314002233a600234e0785aa1.tar.gz
lwn-3a58107e4ed76e3a314002233a600234e0785aa1.zip
e1000: Prevent reset task killing itself.
commit 8ce6909f77ba1b7bcdea65cc2388fd1742b6d669 upstream. Killing reset task while adapter is resetting causes deadlock. Only kill reset task if adapter is not resetting. Ref bug #43132 on bugzilla.kernel.org Signed-off-by: Tushar Dave <tushar.n.dave@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index cf480b554622..de008058974d 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -494,7 +494,11 @@ out:
static void e1000_down_and_stop(struct e1000_adapter *adapter)
{
set_bit(__E1000_DOWN, &adapter->flags);
- cancel_work_sync(&adapter->reset_task);
+
+ /* Only kill reset task if adapter is not resetting */
+ if (!test_bit(__E1000_RESETTING, &adapter->flags))
+ cancel_work_sync(&adapter->reset_task);
+
cancel_delayed_work_sync(&adapter->watchdog_task);
cancel_delayed_work_sync(&adapter->phy_info_task);
cancel_delayed_work_sync(&adapter->fifo_stall_task);