e1000: Prevent reset task killing itself.
[linux-flexiantxendom0-3.2.10.git] / drivers / net / ethernet / intel / e1000 / e1000_main.c
index 37caa88..8d8908d 100644 (file)
@@ -493,7 +493,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);