[PATCH v3 5/6] PCI/ACPI: Request DPC control only together with AER control

From: Kuppuswamy Sathyanarayanan

Date: Wed Nov 18 2026 - 13:17:38 EST


PCI Firmware r3.3, sec 4.5.2.4, requires the OS to request AER control
when it requests DPC control. calculate_control() requests DPC control
whenever CONFIG_PCIE_DPC and CONFIG_PCIE_EDR are enabled, even if it
does not request AER control, e.g., with "pci=noaer" or when MSI is
disabled.

Request DPC control only if AER control is also requested.

Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
Acked-by: Rafael J. Wysocki (Intel) <rafael@xxxxxxxxxx>
Reviewed-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
---
Changes since v2:
- Fold the PCI Firmware spec reference into the existing comment (Yazen)
- Keep the CONFIG_PCIE_EDR test and mention it in the commit log
- Add Reviewed-by from Yazen

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

diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index a1a9c06012f8..510943649b41 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -515,9 +515,11 @@ static u32 calculate_control(void)
* Per the Downstream Port Containment Related Enhancements ECN to
* the PCI Firmware Spec, r3.2, sec 4.5.1, table 4-5,
* OSC_PCI_EXPRESS_DPC_CONTROL indicates the OS supports both DPC
- * and EDR.
+ * and EDR. PCI Firmware r3.3, sec 4.5.2.4, also requires the OS to
+ * request AER control along with DPC control.
*/
- if (IS_ENABLED(CONFIG_PCIE_DPC) && IS_ENABLED(CONFIG_PCIE_EDR))
+ if (IS_ENABLED(CONFIG_PCIE_DPC) && IS_ENABLED(CONFIG_PCIE_EDR) &&
+ (control & OSC_PCI_EXPRESS_AER_CONTROL))
control |= OSC_PCI_EXPRESS_DPC_CONTROL;

return control;
--
2.43.0