]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/PM: Power up all devices during runtime resume
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 8 Apr 2022 18:29:01 +0000 (20:29 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 5 May 2022 19:19:11 +0000 (14:19 -0500)
commit65c2abaf3b79e71cbb4d6e93c4ba02ce81eafbf2
treec2bf7abb41cbd34af7cc2a938a2e7937aa4c9c92
parenteeec233d25c8ee1b03a49be1f2f0fd1872468e9c
PCI/PM: Power up all devices during runtime resume

Currently, endpoint devices may not be powered up entirely during runtime
resume that follows a D3hot -> D0 transition of the parent bridge.

Namely, even if the power state of an endpoint device, as indicated by its
PCI_PM_CTRL register, is D0 after powering up its parent bridge, it may be
still necessary to bring its ACPI companion into D0 and that should be done
before accessing it.  However, the current code assumes that reading the
PCI_PM_CTRL register is sufficient to establish the endpoint device's power
state, which may lead to problems.

Address that by forcing a power-up of all PCI devices, including the
platform firmware part of it, during runtime resume.

Link: https://lore.kernel.org/linux-pm/11967527.O9o76ZdvQC@kreacher
Fixes: 1fe759259965 ("PCI: Restore config space on runtime resume despite being unbound")
Link: https://lore.kernel.org/r/2652115.mvXUDI8C0e@kreacher
Reported-by: Abhishek Sahu <abhsahu@nvidia.com>
Tested-by: Abhishek Sahu <abhsahu@nvidia.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pci/pci-driver.c