Skip to content

Commit ec6a75e

Browse files
committed
PCI/PM: Clear PCIe PME Status even for legacy power management
Previously, pci_pm_resume_noirq() cleared the PME Status bit in the Root Status register only if the device had no driver or the driver did not implement legacy power management. It should clear PME Status regardless of what sort of power management the driver supports, so do this before checking for legacy power management. This affects Root Ports and Root Complex Event Collectors, for which the usual driver is the PCIe portdrv, which implements new power management, so this change is just on principle, not to fix any actual defects. Fixes: a39bd85 ("PCI/PM: Clear PCIe PME Status bit in core, not PCIe port driver") Link: https://lore.kernel.org/r/20191014230016.240912-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent dc68b40 commit ec6a75e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/pci/pci-driver.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,12 +941,11 @@ static int pci_pm_resume_noirq(struct device *dev)
941941
pci_pm_default_resume_early(pci_dev);
942942

943943
pci_fixup_device(pci_fixup_resume_early, pci_dev);
944+
pcie_pme_root_status_cleanup(pci_dev);
944945

945946
if (pci_has_legacy_pm_support(pci_dev))
946947
return pci_legacy_resume_early(dev);
947948

948-
pcie_pme_root_status_cleanup(pci_dev);
949-
950949
if (drv && drv->pm && drv->pm->resume_noirq)
951950
error = drv->pm->resume_noirq(dev);
952951

0 commit comments

Comments
 (0)