diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-07-12 03:05:39 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-07-12 23:09:21 +0200 |
commit | 0ce3fcaff92908c370334ce3b9111aeea71159d6 (patch) | |
tree | b60bc7ee980415b48df2bb167f2c5ee1efe0d6e9 /drivers/pci/pci.h | |
parent | de3ef1eb1cd0cc3a75f7a3661e10ed827f370ab8 (diff) | |
download | linux-0ce3fcaff92908c370334ce3b9111aeea71159d6.tar.gz linux-0ce3fcaff92908c370334ce3b9111aeea71159d6.tar.bz2 linux-0ce3fcaff92908c370334ce3b9111aeea71159d6.zip |
PCI / PM: Restore PME Enable after config space restoration
Commit dc15e71eefc7 (PCI / PM: Restore PME Enable if skipping wakeup
setup) introduced a mechanism by which the PME Enable bit can be
restored by pci_enable_wake() if dev->wakeup_prepared is set in
case it has been overwritten by PCI config space restoration.
However, that commit overlooked the fact that on some systems (Dell
XPS13 9360 in particular) the AML handling wakeup events checks PME
Status and PME Enable and it won't trigger a Notify() for devices
where those bits are not set while it is running.
That happens during resume from suspend-to-idle when pci_restore_state()
invoked by pci_pm_default_resume_early() clears PME Enable before the
wakeup events are processed by AML, effectively causing those wakeup
events to be ignored.
Fix this issue by restoring the PME Enable configuration right after
pci_restore_state() has been called instead of doing that in
pci_enable_wake().
Fixes: dc15e71eefc7 (PCI / PM: Restore PME Enable if skipping wakeup setup)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r-- | drivers/pci/pci.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 240b2c0fed4b..0a6e737f5325 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -71,6 +71,7 @@ void pci_power_up(struct pci_dev *dev); void pci_disable_enabled_device(struct pci_dev *dev); int pci_finish_runtime_suspend(struct pci_dev *dev); int __pci_pme_wakeup(struct pci_dev *dev, void *ign); +void pci_pme_restore(struct pci_dev *dev); bool pci_dev_keep_suspended(struct pci_dev *dev); void pci_dev_complete_resume(struct pci_dev *pci_dev); void pci_config_pm_runtime_get(struct pci_dev *dev); |