diff options
author | Oza Pawandeep <poza@codeaurora.org> | 2018-07-19 17:58:05 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2018-07-20 15:27:08 -0500 |
commit | e7b0b847de6db161e3917732276e425bc92a2feb (patch) | |
tree | 5eb8faf9a1814f1b863ba66334cae54a5c78d212 /drivers | |
parent | 7ab92e89bf8b0a93f0d53b6d83270e4cd0f7c563 (diff) | |
download | linux-e7b0b847de6db161e3917732276e425bc92a2feb.tar.bz2 |
PCI/AER: Clear only ERR_NONFATAL bits during non-fatal recovery
pci_cleanup_aer_uncorrect_error_status() is called by driver .slot_reset()
methods when handling ERR_NONFATAL errors. Previously this cleared *all*
the bits, including ERR_FATAL bits.
Since we're only handling ERR_NONFATAL errors, clear only the ERR_NONFATAL
error status bits.
Signed-off-by: Oza Pawandeep <poza@codeaurora.org>
[bhelgaas: split to separate patch]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/pcie/aer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index b776a768a434..f853e72524be 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -385,13 +385,16 @@ EXPORT_SYMBOL_GPL(pci_disable_pcie_error_reporting); int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev) { int pos; - u32 status; + u32 status, sev; pos = dev->aer_cap; if (!pos) return -EIO; + /* Clear status bits for ERR_NONFATAL errors only */ pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, &status); + pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_SEVER, &sev); + status &= ~sev; if (status) pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, status); |