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> --- 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 9fa1f97e5b27..01a25e4a5168 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -387,6 +387,10 @@ void pci_aer_init(struct pci_dev *dev) pci_add_ext_cap_save_buffer(dev, PCI_EXT_CAP_ID_ERR, sizeof(u32) * n); pci_aer_clear_status(dev); + + /* Enable AER if requested */ + if (pci_aer_available()) + pci_enable_pcie_error_reporting(dev); } void pci_aer_exit(struct pci_dev *dev) -- 2.34.1