i40e: Fix for trace found with S4 state
authorCarolyn Wyborny <carolyn.wyborny@intel.com>
Tue, 20 Jun 2017 22:16:53 +0000 (15:16 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 26 Jul 2017 10:25:19 +0000 (03:25 -0700)
This patch fixes a problem found in systems when entering
S4 state.  This patch fixes the problem by ensuring that
the misc vector's IRQ is disabled as well.  Without this
patch a stack trace can be seen upon entering S4 state.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@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 2db93d3f6d230a22e49f3f44ef5963e215ea1a65..933b8e357ee413f880907e0c27bd6be87d228429 100644 (file)
@@ -12089,7 +12089,10 @@ static int i40e_suspend(struct pci_dev *pdev, pm_message_t state)
        wr32(hw, I40E_PFPM_WUFC, (pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0));
 
        i40e_stop_misc_vector(pf);
-
+       if (pf->msix_entries) {
+               synchronize_irq(pf->msix_entries[0].vector);
+               free_irq(pf->msix_entries[0].vector, pf);
+       }
        retval = pci_save_state(pdev);
        if (retval)
                return retval;
@@ -12129,6 +12132,15 @@ static int i40e_resume(struct pci_dev *pdev)
        /* handling the reset will rebuild the device state */
        if (test_and_clear_bit(__I40E_SUSPENDED, pf->state)) {
                clear_bit(__I40E_DOWN, pf->state);
+               if (pf->msix_entries) {
+                       err = request_irq(pf->msix_entries[0].vector,
+                                         i40e_intr, 0, pf->int_name, pf);
+                       if (err) {
+                               dev_err(&pf->pdev->dev,
+                                       "request_irq for %s failed: %d\n",
+                                       pf->int_name, err);
+                       }
+               }
                i40e_reset_and_rebuild(pf, false, false);
        }