aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci
diff options
context:
space:
mode:
authorJon Derrick <jonathan.derrick@intel.com>2020-08-06 17:00:17 -0400
committerBjorn Helgaas <bhelgaas@google.com>2020-10-21 09:57:42 -0500
commit93c9fce7d5f3db87f67718a2e5cf09b02c2c2c6a (patch)
tree39ed64cf7e4e5842c22ff48c7042935362f85641 /drivers/pci
parentPCI: vmd: Create IRQ allocation helper (diff)
downloadwireguard-linux-93c9fce7d5f3db87f67718a2e5cf09b02c2c2c6a.tar.xz
wireguard-linux-93c9fce7d5f3db87f67718a2e5cf09b02c2c2c6a.zip
PCI: vmd: Update VMD PM to correctly use generic PCI PM
The pci_save_state() call in vmd_suspend() can be performed by pci_pm_suspend_irq(). This also allows VMD to benefit from the call into pci_prepare_to_sleep(). The pci_restore_state() call in vmd_resume() was restoring state after pci_pm_resume()::pci_restore_standard_config() had already restored state. It's also been suspected that the config state should have been restored before re-requesting IRQs instead of afterwards. Remove the pci_save_state()/pci_restore_state() calls in vmd_suspend()/vmd_resume() to allow proper flow through generic PCI core Power Management code. Link: https://lore.kernel.org/r/20200806210017.5654-1-jonathan.derrick@intel.com Signed-off-by: Jon Derrick <jonathan.derrick@intel.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: You-Sheng Yang <vicamo.yang@canonical.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/controller/vmd.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 3214d785fa5d..c8d46bd01e87 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -783,7 +783,6 @@ static int vmd_suspend(struct device *dev)
for (i = 0; i < vmd->msix_count; i++)
devm_free_irq(dev, pci_irq_vector(pdev, i), &vmd->irqs[i]);
- pci_save_state(pdev);
return 0;
}
@@ -801,7 +800,6 @@ static int vmd_resume(struct device *dev)
return err;
}
- pci_restore_state(pdev);
return 0;
}
#endif