[PATCH v13 2/5] PCI: Assume control of portdrv-related features only when portdrv enabled

From: Kuppuswamy Sathyanarayanan

Date: Sat Sep 19 2026 - 12:29:25 EST


Native control of PME, AER, DPC, and PCIe hotplug depends on the portdrv,
so default to native handling of them only when CONFIG_PCIEPORTBUS is
enabled.

Native control of LTR and SHPC hotplug does not depend on portdrv, so keep
defaulting those to native regardless.

[bhelgaas: commit log]
Link: https://lore.kernel.org/r/fcbe8a624166a1101a755edfef44a185d32ff493.1603766889.git.sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
---
Changes since v12

* Rebased to v7.3-rc3. No code change.
* Commit log reworded. v12 said we can always take control of LTR and
SHPC hotplug unless a platform interface tells us otherwise, which is
not true on ACPI systems.

v12 posting
https://lore.kernel.org/all/20201126011816.711106-1-helgaas@xxxxxxxxxx/

drivers/pci/probe.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 27008e2ea5af..5f7eb6bc438b 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -668,12 +668,14 @@ static void pci_init_host_bridge(struct pci_host_bridge *bridge)
* may implement its own AER handling and use _OSC to prevent the
* OS from interfering.
*/
+#ifdef CONFIG_PCIEPORTBUS
bridge->native_aer = 1;
bridge->native_pcie_hotplug = 1;
- bridge->native_shpc_hotplug = 1;
bridge->native_pme = 1;
- bridge->native_ltr = 1;
bridge->native_dpc = 1;
+#endif
+ bridge->native_ltr = 1;
+ bridge->native_shpc_hotplug = 1;
bridge->domain_nr = PCI_DOMAIN_NR_NOT_SET;
bridge->native_cxl_error = 1;
bridge->dev.type = &pci_host_bridge_type;
--
2.43.0