From 6347fd9aee19cff3d4a087aba36927997b733f36 Mon Sep 17 00:00:00 2001 From: Kuppuswamy Sathyanarayanan Date: Fri, 2 Oct 2026 14:18:25 -0700 Subject: [PATCH] PCI: Assume control of portdrv-related features only when portdrv enabled 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. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20261002211828.1293177-2-sathyanarayanan.kuppuswamy@linux.intel.com --- drivers/pci/probe.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 27008e2ea5af..1e487a213eb0 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -658,6 +658,8 @@ static const struct device_type pci_host_bridge_type = { static void pci_init_host_bridge(struct pci_host_bridge *bridge) { + bool port_services = IS_ENABLED(CONFIG_PCIEPORTBUS); + INIT_LIST_HEAD(&bridge->windows); INIT_LIST_HEAD(&bridge->dma_ranges); INIT_LIST_HEAD(&bridge->ports); @@ -668,12 +670,12 @@ 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. */ - bridge->native_aer = 1; - bridge->native_pcie_hotplug = 1; + bridge->native_aer = port_services; + bridge->native_pcie_hotplug = port_services; bridge->native_shpc_hotplug = 1; - bridge->native_pme = 1; + bridge->native_pme = port_services; bridge->native_ltr = 1; - bridge->native_dpc = 1; + bridge->native_dpc = port_services; bridge->domain_nr = PCI_DOMAIN_NR_NOT_SET; bridge->native_cxl_error = 1; bridge->dev.type = &pci_host_bridge_type;