]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
PCI/PM: Clear PCIe PME Status even for legacy power management
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 10 Oct 2019 21:54:36 +0000 (16:54 -0500)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 30 Jan 2020 15:25:07 +0000 (16:25 +0100)
commitac89f6567470402e98eeef83bf09afd498712336
tree0776ea56e33765175e51d84dd298388664486830
parent803f40ec303c922dea16a53d599e9f01f197ba16
PCI/PM: Clear PCIe PME Status even for legacy power management

BugLink: https://bugs.launchpad.net/bugs/1861085
commit ec6a75ef8e33fe33f963b916fd902c52a0be33ff upstream.

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: a39bd851dccf ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/pci/pci-driver.c