Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0729c594 authored by Keith Busch's avatar Keith Busch Committed by Greg Kroah-Hartman
Browse files

PCI/AER: Don't read upstream ports below fatal errors



[ Upstream commit 9d938ea53b265ed6df6cdd1715d971f0235fdbfc ]

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: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarSinan Kaya <okaya@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f3f55d83
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1116,7 +1116,8 @@ int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info)
			&info->mask);
		if (!(info->status & ~info->mask))
			return 0;
	} else if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
	} else if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT ||
	           pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM ||
		   info->severity == AER_NONFATAL) {

		/* Link is still healthy for IO reads */