diff options
author | Keith Busch <keith.busch@intel.com> | 2017-02-03 16:46:12 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-02-10 14:35:02 -0600 |
commit | 87b336d003d47876e376d943be3c9d35152f3b86 (patch) | |
tree | 5e0081e8034ad7bbc7825900cf8bf6707805a5ec | |
parent | 7ce7d89f48834cefece7804d38fc5d85382edf77 (diff) | |
download | op-kernel-dev-87b336d003d47876e376d943be3c9d35152f3b86.zip op-kernel-dev-87b336d003d47876e376d943be3c9d35152f3b86.tar.gz |
PCI/DPC: Decode extended reasons
Decode the currently defined extended event reasons rather than just using
the generic "extended" explanation.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | drivers/pci/pcie/pcie-dpc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c index 9811b14..5a261fd 100644 --- a/drivers/pci/pcie/pcie-dpc.c +++ b/drivers/pci/pcie/pcie-dpc.c @@ -73,11 +73,15 @@ static irqreturn_t dpc_irq(int irq, void *context) if (status & PCI_EXP_DPC_STATUS_TRIGGER) { u16 reason = (status >> 1) & 0x3; + u16 ext_reason = (status >> 5) & 0x3; - dev_warn(&dpc->dev->device, "DPC %s triggered, remove downstream devices\n", + dev_warn(&dpc->dev->device, "DPC %s detected, remove downstream devices\n", (reason == 0) ? "unmasked uncorrectable error" : (reason == 1) ? "ERR_NONFATAL" : - (reason == 2) ? "ERR_FATAL" : "extended error"); + (reason == 2) ? "ERR_FATAL" : + (ext_reason == 0) ? "RP PIO error" : + (ext_reason == 1) ? "software trigger" : + "reserved error"); schedule_work(&dpc->work); } return IRQ_HANDLED; |