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 <[email protected]>
Reviewed-by: Keith Busch <[email protected]>
Reviewed-by: Sinan Kaya <[email protected]>
This commit is contained in:
Bjorn Helgaas 2018-01-16 17:37:50 -06:00 • committed by Bjorn Helgaas
commit 01060e3d4e
2 changed files with 4 additions and 2 deletions

View file

@ -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" :