aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2018-09-20 12:27:10 -0400
committerBjorn Helgaas <bhelgaas@google.com>2018-09-21 13:18:09 -0400
commit9d938ea53b265ed6df6cdd1715d971f0235fdbfc (patch)
treed7fbcc1e257bcd6e419d86bbbca616b4e68dc707
parent60271ab044a53edb9dcbe76bebea2221c4ff04d9 (diff)
PCI/AER: Don't read upstream ports below fatal errors
The AER driver has never read the config space of an endpoint that reported a fatal error because the link to that device is considered unreliable. An ERR_FATAL from an upstream port almost certainly indicates an error on its upstream link, so we can't expect to reliably read its config space for the same reason. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Sinan Kaya <okaya@kernel.org>
-rw-r--r--drivers/pci/pcie/aer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index ffbbd759683c..5c3ea7254c6a 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -1116,8 +1116,9 @@ int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info)
1116 &info->mask); 1116 &info->mask);
1117 if (!(info->status & ~info->mask)) 1117 if (!(info->status & ~info->mask))
1118 return 0; 1118 return 0;
1119 } else if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || 1119 } else if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT ||
1120 info->severity == AER_NONFATAL) { 1120 pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM ||
1121 info->severity == AER_NONFATAL) {
1121 1122
1122 /* Link is still healthy for IO reads */ 1123 /* Link is still healthy for IO reads */
1123 pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, 1124 pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS,