aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2018-01-26 07:45:18 -0600
committerBjorn Helgaas <helgaas@kernel.org>2018-01-30 15:25:39 -0600
commite68d281ceeba26c0fb4c8fe2becf24af5b634a7a (patch)
tree073ea044b846dc9c3cb1dec6931b5ddd7fd3dd68 /drivers/pci
parentPCI/DPC: Read RP PIO Log Size once at probe (diff)
downloadlinux-dev-e68d281ceeba26c0fb4c8fe2becf24af5b634a7a.tar.xz
linux-dev-e68d281ceeba26c0fb4c8fe2becf24af5b634a7a.zip
PCI/DPC: Process RP PIO details only if RP PIO extensions supported
The RP PIO registers (status, mask, severity, etc) are only implemented if the "RP Extensions for DPC" bit is set in the DPC Capabilities register. Previously we called dpc_process_rp_pio_error(), which reads and decodes those RP PIO registers, whenever the DPC Status register indicated an "RP PIO error" (Trigger Reason == 3 and Trigger Reason Extension == 0). It does seem reasonable to assume that DPC Status would only indicate an RP PIO error if the RP extensions are supported, but PCIe r4.0, sec 7.9.15.4, is actually not explicit about that: it does not say "Trigger Reason Extension == 0 is valid only for Root Ports that support RP Extensions for DPC." Check whether the RP Extensions for DPC are supported before trying to read the RP PIO registers. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Sinan Kaya <okaya@codeaurora.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pcie/pcie-dpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c
index 17f60bd4ea5f..a6b8d1496322 100644
--- a/drivers/pci/pcie/pcie-dpc.c
+++ b/drivers/pci/pcie/pcie-dpc.c
@@ -281,7 +281,7 @@ static irqreturn_t dpc_irq(int irq, void *context)
(ext_reason == 1) ? "software trigger" :
"reserved error");
/* show RP PIO error detail information */
- if (reason == 3 && ext_reason == 0)
+ if (dpc->rp_extensions && reason == 3 && ext_reason == 0)
dpc_process_rp_pio_error(dpc);
schedule_work(&dpc->work);