i40evf: do not re-arm watchdog after remove
authorAshish Shah <ashish.n.shah@intel.com>
Fri, 1 Aug 2014 20:27:12 +0000 (13:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 Aug 2014 02:41:14 +0000 (19:41 -0700)
Add in an adapter state check to prevent re-arming watchdog timer after
i40evf_remove has been called and timer has been deleted.

Change-ID: I636ba7c6322be8cbf053231959f90c0a2d8d803a
Signed-off-by: Ashish Shah <ashish.n.shah@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/i40evf/i40evf_main.c

index 4c01079fc2ffb9b4dd8f8957c405fd12c58d6da0..2aca9cf4511901e973e6a9c9abde6f4daa31ba84 100644 (file)
@@ -1403,6 +1403,8 @@ static void i40evf_watchdog_task(struct work_struct *work)
 watchdog_done:
        clear_bit(__I40EVF_IN_CRITICAL_TASK, &adapter->crit_section);
 restart_watchdog:
+       if (adapter->state == __I40EVF_REMOVE)
+               return;
        if (adapter->aq_required)
                mod_timer(&adapter->watchdog_timer,
                          jiffies + msecs_to_jiffies(20));