|
@@ -494,13 +494,20 @@ static void e1000_down_and_stop(struct e1000_adapter *adapter)
|
|
|
{
|
|
|
set_bit(__E1000_DOWN, &adapter->flags);
|
|
|
|
|
|
- /* 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);
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Since the watchdog task can reschedule other tasks, we should cancel
|
|
|
+ * it first, otherwise we can run into the situation when a work is
|
|
|
+ * still running after the adapter has been turned down.
|
|
|
+ */
|
|
|
+
|
|
|
cancel_delayed_work_sync(&adapter->phy_info_task);
|
|
|
cancel_delayed_work_sync(&adapter->fifo_stall_task);
|
|
|
+
|
|
|
+ /* Only kill reset task if adapter is not resetting */
|
|
|
+ if (!test_bit(__E1000_RESETTING, &adapter->flags))
|
|
|
+ cancel_work_sync(&adapter->reset_task);
|
|
|
}
|
|
|
|
|
|
void e1000_down(struct e1000_adapter *adapter)
|