Re: [PATCH v2 1/1] drivers/pci: Decouple DPC from AER service

Lukas Wunner
2025-12-09T07:55:21Z

[cc += Keith, Olaf; start of thread is here:
https://lore.kernel.org/all/20251208112545.21315-1-darnshah@amazon.de/
]

On Mon, Dec 08, 2025 at 11:25:45AM +0000, Darshit Shah wrote:
> According to [1] it is recommended that the Operating System link the

Minor stylistic issue: We generally refer to the latest spec revision,
the reference at [1] doesn't mention the title of the Implementation Note
and personally I find it easier to read the commit message if references
are provided inline, so I'd recommend:

According to PCIe r7.0, sec 6.2.11, "Implementation Note: Determination
of DPC Control", it is recommended that ...

> +++ 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)))
> + (host->native_aer || pcie_ports_dpc_native))
> services |= PCIE_PORT_SERVICE_DPC;
>
> /* Enable bandwidth control if more than one speed is supported. */

Somewhat tangential, I note that the pci_aer_available() check results
in DPC not being handled by Linux if pci=nomsi is specified on the
command line. However PCIe r7.0 sec 6.2.11.1 explicitly mentions
use of INTx for DPC, suggesting that MSI support is not required.

Either case, your change looks reasonable to me, so:

Reviewed-by: Lukas Wunner <lukas@wunner.de>

Thanks,

Lukas