aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2022-01-25 08:18:20 +0100
committerBjorn Helgaas <bhelgaas@google.com>2022-07-13 14:44:12 -0500
commitf26e58bf6f547031f91a1b0e39b9308d48a4ba8c (patch)
tree375454a76f6fae0e299f75433f6993ec587b5a19
parentPCI/portdrv: Don't disable AER reporting in get_port_device_capability() (diff)
downloadwireguard-linux-f26e58bf6f547031f91a1b0e39b9308d48a4ba8c.tar.xz
wireguard-linux-f26e58bf6f547031f91a1b0e39b9308d48a4ba8c.zip
PCI/AER: Enable error reporting when AER is native
If we have native control of AER, set the following error reporting enable bits: - Correctable Error Reporting Enable - Non-Fatal Error Reporting Enable - Fatal Error Reporting Enable - Unsupported Request Reporting Enable Note that these bits are all in the Device Control register and are not AER-specific. This affects all devices with an AER capability, including hot-added devices. Please note that this change is quite invasive, as error reporting now will be enabled for all available PCIe Endpoints, which was previously not the case. When "pci=noaer" is selected, error reporting stays disabled of course. [bhelgaas: commit log, note error reporting is not AER-specific] Link: https://lore.kernel.org/r/20220125071820.2247260-4-sr@denx.de Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Pali Rohár <pali@kernel.org> Cc: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Yao Hongbo <yaohongbo@linux.alibaba.com> Cc: Naveen Naidu <naveennaidu479@gmail.com>
-rw-r--r--drivers/pci/pcie/aer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index eb665aca08f2..8cfdd46b774e 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -393,6 +393,9 @@ void pci_aer_init(struct pci_dev *dev)
pci_aer_clear_status(dev);
+ if (pci_aer_available())
+ pci_enable_pcie_error_reporting(dev);
+
pcie_set_ecrc_checking(dev);
}