Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0dc84b8c authored by Tony Truong's avatar Tony Truong Committed by Gerrit - the friendly Code Review server
Browse files

pci: framework: skip PCI restore in pci_pm_resume if no_d3hot is set



PCI devices with no_d3hot set do not need its configuration
space restored in pci_pm_resume.

Change-Id: Ia92f5278bfbd35d082fce53d9b2de9397a69b942
Signed-off-by: default avatarTony Truong <truong@codeaurora.org>
parent 773b595b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -908,6 +908,9 @@ 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.
@@ -915,6 +918,7 @@ static int pci_pm_resume(struct device *dev)
	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);