Skip to content

Commit

Permalink
Merge branch 'pci/error'
Browse files Browse the repository at this point in the history
- Clear AER "multiple errors" bits to avoid race that left them set forever
  (Kuppuswamy Sathyanarayanan)

* pci/error:
  PCI/AER: Clear MULTI_ERR_COR/UNCOR_RCV bits
  • Loading branch information
bjorn-helgaas committed May 24, 2022
2 parents ae0d0d1 + 203926d commit 55fd033
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/pci/pcie/aer.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ struct aer_stats {
#define ERR_COR_ID(d) (d & 0xffff)
#define ERR_UNCOR_ID(d) (d >> 16)

#define AER_ERR_STATUS_MASK (PCI_ERR_ROOT_UNCOR_RCV | \
PCI_ERR_ROOT_COR_RCV | \
PCI_ERR_ROOT_MULTI_COR_RCV | \
PCI_ERR_ROOT_MULTI_UNCOR_RCV)

static int pcie_aer_disable;
static pci_ers_result_t aer_root_reset(struct pci_dev *dev);

Expand Down Expand Up @@ -1196,7 +1201,7 @@ static irqreturn_t aer_irq(int irq, void *context)
struct aer_err_source e_src = {};

pci_read_config_dword(rp, aer + PCI_ERR_ROOT_STATUS, &e_src.status);
if (!(e_src.status & (PCI_ERR_ROOT_UNCOR_RCV|PCI_ERR_ROOT_COR_RCV)))
if (!(e_src.status & AER_ERR_STATUS_MASK))
return IRQ_NONE;

pci_read_config_dword(rp, aer + PCI_ERR_ROOT_ERR_SRC, &e_src.id);
Expand Down

0 comments on commit 55fd033

Please sign in to comment.