summaryrefslogtreecommitdiff
path: root/drivers/pci/pcie/aer
diff options
context:
space:
mode:
authorJon Derrick <jonathan.derrick@intel.com>2016-08-26 02:26:10 +0300
committerBjorn Helgaas <bhelgaas@google.com>2016-09-06 22:15:11 +0300
commit032c3d86b4acc4c21e435c85c454eac670c15851 (patch)
treecba5819b11e185a6a17ca20a79ce34b4675b147e /drivers/pci/pcie/aer
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
downloadlinux-032c3d86b4acc4c21e435c85c454eac670c15851.tar.xz
PCI/AER: Add bus flag to skip source ID matching
Allow root port buses to choose to skip source id matching when finding the faulting device. Certain root port devices may return an incorrect source ID and recommend to scan child device registers for AER notifications. Signed-off-by: Jon Derrick <jonathan.derrick@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pcie/aer')
-rw-r--r--drivers/pci/pcie/aer/aerdrv_core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
index 521e39c1b66d..8f5e14cac600 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -132,7 +132,9 @@ static bool is_error_source(struct pci_dev *dev, struct aer_err_info *e_info)
* When bus id is equal to 0, it might be a bad id
* reported by root port.
*/
- if (!nosourceid && (PCI_BUS_NUM(e_info->id) != 0)) {
+ if (!nosourceid &&
+ (PCI_BUS_NUM(e_info->id) != 0) &&
+ !(dev->bus->bus_flags & PCI_BUS_FLAGS_NO_AERSID)) {
/* Device ID match? */
if (e_info->id == ((dev->bus->number << 8) | dev->devfn))
return true;
@@ -147,7 +149,8 @@ static bool is_error_source(struct pci_dev *dev, struct aer_err_info *e_info)
* 1) nosourceid==y;
* 2) bus id is equal to 0. Some ports might lose the bus
* id of error source id;
- * 3) There are multiple errors and prior id comparing fails;
+ * 3) bus flag PCI_BUS_FLAGS_NO_AERSID is set
+ * 4) There are multiple errors and prior ID comparing fails;
* We check AER status registers to find possible reporter.
*/
if (atomic_read(&dev->enable_cnt) == 0)