提交 8ce6909f 编写于 作者: T Tushar Dave 提交者: David S. Miller

e1000: Prevent reset task killing itself.

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

CC: stable@vger.kernel.org
Signed-off-by: NTushar Dave <tushar.n.dave@intel.com>
Tested-by: NAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 bad115cf
...@@ -493,7 +493,11 @@ static void e1000_power_down_phy(struct e1000_adapter *adapter) ...@@ -493,7 +493,11 @@ static void e1000_power_down_phy(struct e1000_adapter *adapter)
static void e1000_down_and_stop(struct e1000_adapter *adapter) static void e1000_down_and_stop(struct e1000_adapter *adapter)
{ {
set_bit(__E1000_DOWN, &adapter->flags); 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->watchdog_task);
cancel_delayed_work_sync(&adapter->phy_info_task); cancel_delayed_work_sync(&adapter->phy_info_task);
cancel_delayed_work_sync(&adapter->fifo_stall_task); cancel_delayed_work_sync(&adapter->fifo_stall_task);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册