Skip to content

Commit 8795e18

Browse files
stroesebjorn-helgaas
authored andcommitted
PCI/portdrv: Don't disable AER reporting in get_port_device_capability()
AER reporting is currently disabled in the DevCtl registers of all non Root Port PCIe devices on systems using pcie_ports_native || host->native_aer, disabling AER completely in such systems. This is because 2bd50dd ("PCI: PCIe: Disable PCIe port services during port initialization"), added a call to pci_disable_pcie_error_reporting() *after* the AER setup was completed for the PCIe device tree. Here a longer analysis about the current status of AER enabling / disabling upon bootup provided by Bjorn: pcie_portdrv_probe pcie_port_device_register get_port_device_capability pci_disable_pcie_error_reporting clear CERE NFERE FERE URRE # <-- disable for RP USP DSP pcie_device_init device_register # new AER service device aer_probe aer_enable_rootport # RP only set_downstream_devices_error_reporting set_device_error_reporting # self (RP) if (RP || USP || DSP) pci_enable_pcie_error_reporting set CERE NFERE FERE URRE # <-- enable for RP pci_walk_bus set_device_error_reporting if (RP || USP || DSP) pci_enable_pcie_error_reporting set CERE NFERE FERE URRE # <-- enable for USP DSP In a typical Root Port -> Endpoint hierarchy, the above: - Disables Error Reporting for the Root Port, - Enables Error Reporting for the Root Port, - Does NOT enable Error Reporting for the Endpoint because it is not a Root Port or Switch Port. In a deeper Root Port -> Upstream Switch Port -> Downstream Switch Port -> Endpoint hierarchy: - Disables Error Reporting for the Root Port, - Enables Error Reporting for the Root Port, - Enables Error Reporting for both Switch Ports, - Does NOT enable Error Reporting for the Endpoint because it is not a Root Port or Switch Port, - Disables Error Reporting for the Switch Ports when pcie_portdrv_probe() claims them. AER does not re-enable it because these are not Root Ports. Remove this call to pci_disable_pcie_error_reporting() from get_port_device_capability(), leaving the already enabled AER configuration intact. With this change, AER is enabled in the Root Port and the PCIe switch upstream and downstream ports. Only the PCIe Endpoints don't have AER enabled yet. A follow-up patch will take care of this Endpoint enabling. Fixes: 2bd50dd ("PCI: PCIe: Disable PCIe port services during port initialization") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stefan Roese <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Pali Rohár <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Bharat Kumar Gogada <[email protected]> Cc: Michal Simek <[email protected]> Cc: Yao Hongbo <[email protected]> Cc: Naveen Naidu <[email protected]>
1 parent 9ffb98f commit 8795e18

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/pci/pcie/portdrv_core.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,8 @@ static int get_port_device_capability(struct pci_dev *dev)
222222

223223
#ifdef CONFIG_PCIEAER
224224
if (dev->aer_cap && pci_aer_available() &&
225-
(pcie_ports_native || host->native_aer)) {
225+
(pcie_ports_native || host->native_aer))
226226
services |= PCIE_PORT_SERVICE_AER;
227-
228-
/*
229-
* Disable AER on this port in case it's been enabled by the
230-
* BIOS (the AER service driver will enable it when necessary).
231-
*/
232-
pci_disable_pcie_error_reporting(dev);
233-
}
234227
#endif
235228

236229
/* Root Ports and Root Complex Event Collectors may generate PMEs */

0 commit comments

Comments
 (0)