|
@@ -399,6 +399,23 @@ int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev)
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(pci_cleanup_aer_uncorrect_error_status);
|
|
|
|
|
|
+void pci_aer_clear_fatal_status(struct pci_dev *dev)
|
|
|
+{
|
|
|
+ int pos;
|
|
|
+ u32 status, sev;
|
|
|
+
|
|
|
+ pos = dev->aer_cap;
|
|
|
+ if (!pos)
|
|
|
+ return;
|
|
|
+
|
|
|
+ /* Clear status bits for ERR_FATAL 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);
|
|
|
+}
|
|
|
+
|
|
|
int pci_cleanup_aer_error_status_regs(struct pci_dev *dev)
|
|
|
{
|
|
|
int pos;
|