diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2024-03-12 12:14:22 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2024-03-12 12:14:22 -0500 |
commit | 7dc249e7b9cf5ba31167e5e5bc60c2ede76e8869 (patch) | |
tree | 47cbb1eda376b874539e3db6f029ef74e4442a7e /drivers | |
parent | 3dfd8247969adeaa814a335f994eaebea36a53bd (diff) | |
parent | 9d5286d4e7f68beab450deddbb6a32edd5ecf4bf (diff) | |
download | linux-7dc249e7b9cf5ba31167e5e5bc60c2ede76e8869.tar.gz linux-7dc249e7b9cf5ba31167e5e5bc60c2ede76e8869.tar.bz2 linux-7dc249e7b9cf5ba31167e5e5bc60c2ede76e8869.zip |
Merge branch 'pci/pm'
- Disable use of D3cold on Asus B1400 PCI-NVMe bridges because some BIOSes
can't power them back on, replacing a more general ACPI sleep quirk
(Daniel Drake)
- Allow runtime PM when the driver enables it but doesn't need any runtime
PM callbacks (Raag Jadav)
- Drain runtime-idle callbacks before driver removal to avoid races between
.remove() and .runtime_idle(), which caused intermittent page faults when
the rtsx .runtime_idle() accessed registers that its .remove() had
already unmapped (Rafael J. Wysocki)
* pci/pm:
PCI/PM: Drain runtime-idle callbacks before driver removal
PCI/PM: Allow runtime PM with no PM callbacks at all
Revert "ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default"
PCI: Disable D3cold on Asus B1400 PCI-NVMe bridge
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/sleep.c | 12 | ||||
-rw-r--r-- | drivers/pci/pci-driver.c | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 808484d11209..728acfeb774d 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -385,18 +385,6 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "20GGA00L00"), }, }, - /* - * ASUS B1400CEAE hangs on resume from suspend (see - * https://bugzilla.kernel.org/show_bug.cgi?id=215742). - */ - { - .callback = init_default_s3, - .ident = "ASUS B1400CEAE", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), - DMI_MATCH(DMI_PRODUCT_NAME, "ASUS EXPERTBOOK B1400CEAE"), - }, - }, {}, }; diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index ec838f2e892e..072b83493194 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -464,6 +464,13 @@ static void pci_device_remove(struct device *dev) if (drv->remove) { pm_runtime_get_sync(dev); + /* + * If the driver provides a .runtime_idle() callback and it has + * started to run already, it may continue to run in parallel + * with the code below, so wait until all of the runtime PM + * activity has completed. + */ + pm_runtime_barrier(dev); drv->remove(pci_dev); pm_runtime_put_noidle(dev); } @@ -1373,10 +1380,7 @@ static int pci_pm_runtime_idle(struct device *dev) if (!pci_dev->driver) return 0; - if (!pm) - return -ENOSYS; - - if (pm->runtime_idle) + if (pm && pm->runtime_idle) return pm->runtime_idle(dev); return 0; |