]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/PM: Clear PCIe PME Status bit in core, not PCIe port driver
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 9 Mar 2018 17:06:54 +0000 (11:06 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 12 Mar 2018 14:16:20 +0000 (09:16 -0500)
commit4c835ef7954e9fd2024391ea8f49bf8a0b03404d
treee547ae9a6e9191f5a0e365ec20c40b58f5a20fbf
parenta8e95db8fcaa6176f4aa25395017191804a9691f
PCI/PM: Clear PCIe PME Status bit in core, not PCIe port driver

98a29f31da80 ("PCI/PCIe: Clear Root PME Status bits early during system
resume") added a .resume_noirq() callback to the PCIe port driver to clear
the PME Status bit during resume to work around a BIOS issue.

The BIOS evidently enabled PME interrupts for ACPI-based runtime wakeups
but did not clear the PME Status bit during resume, which meant PMEs after
resume did not trigger interrupts because PME Status did not transition
from cleared to set.

The fix was in the PCIe port driver, so it worked when CONFIG_PCIEPORTBUS
was set.  But I think we *always* want the fix because the platform may use
PME interrupts even if Linux is built without the PCIe port driver.

Move the fix from the port driver to the PCI core so we can work around
this "PME doesn't work after waking from a sleep state" issue regardless of
CONFIG_PCIEPORTBUS.

[bhelgaas: folded in warning fix from Arnd Bergmann <arnd@arndb.de>:
https://lkml.kernel.org/r/20180328134747.2062348-1-arnd@arndb.de]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci-driver.c
drivers/pci/pcie/portdrv_pci.c