PCI: vmd: Update VMD PM to correctly use generic PCI PM
authorJon Derrick <jonathan.derrick@intel.com>
Thu, 6 Aug 2020 21:00:17 +0000 (17:00 -0400)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 21 Oct 2020 14:57:42 +0000 (09:57 -0500)
commit93c9fce7d5f3db87f67718a2e5cf09b02c2c2c6a
tree39ed64cf7e4e5842c22ff48c7042935362f85641
parent875b4e2a93bb2c3ddefb4dcb292c4bfd46ccc464
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>
drivers/pci/controller/vmd.c