]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
i40e: Move function calls to i40e_shutdown instead of i40e_suspend
authorCatherine Sullivan <catherine.sullivan@intel.com>
Fri, 10 Jul 2015 23:35:59 +0000 (19:35 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 26 Aug 2015 21:49:09 +0000 (14:49 -0700)
We should be stopping the service task and flow director on
shutdown not on suspension.

Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index ded62eb3204fc7efd1121cd6a3305572333708df..07bfe61e5f7197dadeb892d5f3d12f2c1ced6373 100644 (file)
@@ -10450,6 +10450,19 @@ static void i40e_shutdown(struct pci_dev *pdev)
        wr32(hw, I40E_PFPM_APM, (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0));
        wr32(hw, I40E_PFPM_WUFC, (pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0));
 
+       del_timer_sync(&pf->service_timer);
+       cancel_work_sync(&pf->service_task);
+       i40e_fdir_teardown(pf);
+
+       rtnl_lock();
+       i40e_prep_for_reset(pf);
+       rtnl_unlock();
+
+       wr32(hw, I40E_PFPM_APM,
+            (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0));
+       wr32(hw, I40E_PFPM_WUFC,
+            (pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0));
+
        i40e_clear_interrupt_scheme(pf);
 
        if (system_state == SYSTEM_POWER_OFF) {
@@ -10470,9 +10483,6 @@ static int i40e_suspend(struct pci_dev *pdev, pm_message_t state)
 
        set_bit(__I40E_SUSPENDED, &pf->state);
        set_bit(__I40E_DOWN, &pf->state);
-       del_timer_sync(&pf->service_timer);
-       cancel_work_sync(&pf->service_task);
-       i40e_fdir_teardown(pf);
 
        rtnl_lock();
        i40e_prep_for_reset(pf);