[PATCH v1 9/9] PCI: PM: Set power.strict_midlayer in pci_pm_init()

From: Rafael J. Wysocki
Date: Wed Jun 25 2025 - 15:26:17 EST


From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

The PCI bus type does not expect its runtime PM callbacks,
pci_pm_runtime_suspend() and pci_pm_runtime_resume(), to be invoked at
any point during system-wide suspend and resume, so make it express
that expectation by setting power.strict_midlayer for all PCI devices.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
---
drivers/pci/pci.c | 2 ++
1 file changed, 2 insertions(+)

--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3208,6 +3208,8 @@
u16 status;
u16 pmc;

+ dev_pm_strict_midlayer(&dev->dev, true);
+
device_enable_async_suspend(&dev->dev);
dev->wakeup_prepared = false;