With this change, AER is now enabled on all PCIe devices, also when the PCIe device is hot-plugged. Please note that this change is quite invasive, as with this patch applied, AER now will be enabled in the Device Control registers of all available PCIe Endpoints, which currently is not the case. When "pci=noaer" is selected, AER stays disabled of course. Signed-off-by: Stefan Roese <sr@xxxxxxx> Cc: Bjorn Helgaas <helgaas@xxxxxxxxxx> Cc: Pali Rohár <pali@xxxxxxxxxx> Cc: Bharat Kumar Gogada <bharat.kumar.gogada@xxxxxxxxxx> Cc: Michal Simek <michal.simek@xxxxxxxxxx> Cc: Yao Hongbo <yaohongbo@xxxxxxxxxxxxxxxxx> Cc: Naveen Naidu <naveennaidu479@xxxxxxxxx> --- v4: - No change v3: - New patch, replacing the "old" 2/2 patch Now enabling of AER for each PCIe device is done in pci_aer_init(), which also makes sure that AER is enabled in each PCIe device even when it's hot-plugged. drivers/pci/pcie/aer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 5585fefc4d0e..10b2f7db8adb 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -388,6 +388,10 @@ void pci_aer_init(struct pci_dev *dev) pci_aer_clear_status(dev); + /* Enable AER if requested */ + if (pci_aer_available()) + pci_enable_pcie_error_reporting(dev); + /* Enable ECRC checking if enabled and configured */ pcie_set_ecrc_checking(dev); } -- 2.35.0