summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshit Shah <darnshah@amazon.de>2025-12-11 16:42:53 +0000
committerBjorn Helgaas <bhelgaas@google.com>2026-07-10 11:47:11 -0500
commit97ca178c899d0049210d325b123ed024eb5ac000 (patch)
tree367dcad7ecbcefe0f72f4544bc303c6cd10fb449
parentdc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff)
PCI/DPC: Allow DPC on all Downstream Ports when OS controls AER
PCIe r7.0, sec 6.2.11, "Implementation Note: Determination of DPC Control", recommends that "... operating systems always link control of DPC to the control of Advanced Error Reporting." Any PCIe device may advertise AER, but only Root Ports and Root Complex Event Collectors can generate AER interrupts, so the AER driver only binds to RPs and RCECs. Any Root Port or Switch Downstream Port may advertise Downstream Port Containment (DPC), but previously the DPC driver was limited to devices the AER driver could bind to, i.e., only RPs that advertised AER. Since any Port with DPC can generate DPC interrupts, allow the DPC driver to bind to such a Port as long as the OS controls AER, regardless of whether the AER driver binds to it. Signed-off-by: Darshit Shah <darnshah@amazon.de> [bhelgaas: commit log, reorder || operands to simplify patch] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Lukas Wunner <lukas@wunner.de> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20251211164257.81655-1-darnshah@amazon.de
-rw-r--r--drivers/pci/pcie/portdrv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c
index 2d6aa488fe7b..65f502602dee 100644
--- a/drivers/pci/pcie/portdrv.c
+++ b/drivers/pci/pcie/portdrv.c
@@ -264,7 +264,7 @@ static int get_port_device_capability(struct pci_dev *dev)
*/
if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC) &&
pci_aer_available() &&
- (pcie_ports_dpc_native || (services & PCIE_PORT_SERVICE_AER)))
+ (pcie_ports_dpc_native || host->native_aer))
services |= PCIE_PORT_SERVICE_DPC;
/* Enable bandwidth control if more than one speed is supported. */