mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
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
This commit is contained in:
committed by
Bjorn Helgaas
parent
dc59e4fea9
commit
97ca178c89
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user