aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Truong <truong@codeaurora.org>2019-08-01 19:35:29 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-08-16 10:16:08 -0700
commit4dc5db4d6502dbc8f40e67e7555db3ac4533a99b (patch)
treebbb4de4e7da03debb08c6c86e95b3f63bac08ecb
parente0463d37de2fc280420c3328eaf69b2847f1eb3e (diff)
pci: framework: skip PCI restore in pci_pm_resume if no_d3hot is setLA.UM.7.1.r1-16300-sm8150.0
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>
-rw-r--r--drivers/pci/pci-driver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index a394ebdc258c..a3e1b5d127f1 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -853,6 +853,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.
@@ -860,6 +863,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);