aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2018-01-16 17:37:50 -0600
committerBjorn Helgaas <helgaas@kernel.org>2018-01-30 15:26:25 -0600
commit01060e3d4e423146ecf9d308814e16a357671ddf (patch)
treea87a20d4b9558000bbd59a474121a13c1b3b3544 /drivers/pci
parentPCI/DPC: Squash dpc_rp_pio_get_info() into dpc_process_rp_pio_error() (diff)
downloadlinux-dev-01060e3d4e423146ecf9d308814e16a357671ddf.tar.xz
linux-dev-01060e3d4e423146ecf9d308814e16a357671ddf.zip
PCI/DPC: Add and use DPC Status register field definitions
Add definitions for DPC Status register fields and use them in the code. No functional change intended. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c
index 0f4eb6111ab4..7eb9bc7d4bfd 100644
--- a/drivers/pci/pcie/pcie-dpc.c
+++ b/drivers/pci/pcie/pcie-dpc.c
@@ -211,8 +211,8 @@ static irqreturn_t dpc_irq(int irq, void *context)
dev_info(dev, "DPC containment event, status:%#06x source:%#06x\n",
status, source);
- reason = (status >> 1) & 0x3;
- ext_reason = (status >> 5) & 0x3;
+ reason = (status & PCI_EXP_DPC_STATUS_TRIGGER_RSN) >> 1;
+ ext_reason = (status & PCI_EXP_DPC_STATUS_TRIGGER_RSN_EXT) >> 5;
dev_warn(dev, "DPC %s detected, remove downstream devices\n",
(reason == 0) ? "unmasked uncorrectable error" :