Commit 93c9fce7 authored by Jon Derrick's avatar Jon Derrick Committed by Bjorn Helgaas

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.comSigned-off-by: default avatarJon Derrick <jonathan.derrick@intel.com>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: You-Sheng Yang <vicamo.yang@canonical.com>
parent 875b4e2a
...@@ -783,7 +783,6 @@ static int vmd_suspend(struct device *dev) ...@@ -783,7 +783,6 @@ static int vmd_suspend(struct device *dev)
for (i = 0; i < vmd->msix_count; i++) for (i = 0; i < vmd->msix_count; i++)
devm_free_irq(dev, pci_irq_vector(pdev, i), &vmd->irqs[i]); devm_free_irq(dev, pci_irq_vector(pdev, i), &vmd->irqs[i]);
pci_save_state(pdev);
return 0; return 0;
} }
...@@ -801,7 +800,6 @@ static int vmd_resume(struct device *dev) ...@@ -801,7 +800,6 @@ static int vmd_resume(struct device *dev)
return err; return err;
} }
pci_restore_state(pdev);
return 0; return 0;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment