|
@@ -385,13 +385,16 @@ EXPORT_SYMBOL_GPL(pci_disable_pcie_error_reporting);
|
|
|
int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev)
|
|
int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev)
|
|
|
{
|
|
{
|
|
|
int pos;
|
|
int pos;
|
|
|
- u32 status;
|
|
|
|
|
|
|
+ u32 status, sev;
|
|
|
|
|
|
|
|
pos = dev->aer_cap;
|
|
pos = dev->aer_cap;
|
|
|
if (!pos)
|
|
if (!pos)
|
|
|
return -EIO;
|
|
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_STATUS, &status);
|
|
|
|
|
+ pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_SEVER, &sev);
|
|
|
|
|
+ status &= ~sev;
|
|
|
if (status)
|
|
if (status)
|
|
|
pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, status);
|
|
pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, status);
|
|
|
|
|
|