[PATCH 1/3] PCI/PM: Honor PCI_DEV_FLAGS_NO_D3 in pci_bridge_d3_possible()
From: Aviv Bakal
Date: Sun Nov 15 2026 - 12:18:52 EST
pci_set_power_state() does not put a device with PCI_DEV_FLAGS_NO_D3
into D3, but pci_bridge_d3_possible() ignores the flag.
pcie_portdrv_probe() therefore enables runtime PM on such a port, and
on runtime suspend pciehp masks the hotplug interrupt while the port
stays in D0.
Return false from pci_bridge_d3_possible() when the flag is set.
Fixes: d4c79b63d82d ("PCI: Allow D3 for native hotplug-capable Root Ports on non-x86 platforms")
Cc: stable@xxxxxxxxxxxxxxx # 7.3.x
Co-developed-by: Zeev Zilberman <zeev@xxxxxxxxxx>
Signed-off-by: Zeev Zilberman <zeev@xxxxxxxxxx>
Signed-off-by: Aviv Bakal <avivb@xxxxxxxxxx>
---
drivers/pci/pci.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7c6f2aba8144..1a23be4b6a07 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3055,6 +3055,10 @@ bool pci_bridge_d3_possible(struct pci_dev *bridge)
if (pci_bridge_d3_disable)
return false;
+ /* The port is known not to work correctly in D3 */
+ if (bridge->dev_flags & PCI_DEV_FLAGS_NO_D3)
+ return false;
+
/*
* Hotplug ports handled by platform firmware may not be put
* into D3 by the OS, e.g. ACPI slots ...
--
2.50.1