Skip to content

Commit

Permalink
pci: framework: skip PCI restore in pci_pm_resume if no_d3hot is set
Browse files Browse the repository at this point in the history
PCI devices with no_d3hot set do not need its configuration
space restored in pci_pm_resume.

Change-Id: Ia92f5278bfbd35d082fce53d9b2de9397a69b942
Signed-off-by: Tony Truong <truong@codeaurora.org>
  • Loading branch information
Tony Truong authored and Gerrit - the friendly Code Review server committed Aug 16, 2019
1 parent e0463d3 commit 4dc5db4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/pci/pci-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,13 +853,17 @@ static int pci_pm_resume(struct device *dev)
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
int error = 0;

if (pci_dev->no_d3hot)
goto skip_pci_pm_restore;

/*
* This is necessary for the suspend error path in which resume is
* called without restoring the standard config registers of the device.
*/
if (pci_dev->state_saved)
pci_restore_standard_config(pci_dev);

skip_pci_pm_restore:
if (pci_has_legacy_pm_support(pci_dev))
return pci_legacy_resume(dev);

Expand Down

0 comments on commit 4dc5db4

Please sign in to comment.