diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2017-07-02 18:48:47 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-07-02 18:48:47 -0500 |
commit | 397ee434c5bf813db33632957ae50ae3b30226ed (patch) | |
tree | e621e68777b6ef6e7209a245d746ce6838dcac24 /drivers/pci | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
parent | 69a3025def543b66a9610c86706eebb6b160d3b8 (diff) | |
download | linux-397ee434c5bf813db33632957ae50ae3b30226ed.tar.bz2 |
Merge branch 'pci/dpc' into next
* pci/dpc:
PCI/DPC: Fix control register setting
PCI/DPC: Skip DPC event if device is not present
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pcie/pcie-dpc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c index 77d2ca99d2ec..c39f32e42b4d 100644 --- a/drivers/pci/pcie/pcie-dpc.c +++ b/drivers/pci/pcie/pcie-dpc.c @@ -92,7 +92,7 @@ static irqreturn_t dpc_irq(int irq, void *context) pci_read_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_STATUS, &status); pci_read_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_SOURCE_ID, &source); - if (!status) + if (!status || status == (u16)(~0)) return IRQ_NONE; dev_info(&dpc->dev->device, "DPC containment event, status:%#06x source:%#06x\n", @@ -144,7 +144,7 @@ static int dpc_probe(struct pcie_device *dev) dpc->rp = (cap & PCI_EXP_DPC_CAP_RP_EXT); - ctl |= PCI_EXP_DPC_CTL_EN_NONFATAL | PCI_EXP_DPC_CTL_INT_EN; + ctl = (ctl & 0xfff4) | PCI_EXP_DPC_CTL_EN_NONFATAL | PCI_EXP_DPC_CTL_INT_EN; pci_write_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_CTL, ctl); dev_info(&dev->device, "DPC error containment capabilities: Int Msg #%d, RPExt%c PoisonedTLP%c SwTrigger%c RP PIO Log %d, DL_ActiveErr%c\n", |