diff options
| -rw-r--r-- | drivers/pci/pcie/aer/aerdrv_core.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index 2fbbcee033a7..ff4720583aa7 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c | |||
| @@ -84,19 +84,15 @@ EXPORT_SYMBOL_GPL(pci_disable_pcie_error_reporting); | |||
| 84 | int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev) | 84 | int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev) |
| 85 | { | 85 | { |
| 86 | int pos; | 86 | int pos; |
| 87 | u32 status, mask; | 87 | u32 status; |
| 88 | 88 | ||
| 89 | pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); | 89 | pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); |
| 90 | if (!pos) | 90 | if (!pos) |
| 91 | return -EIO; | 91 | return -EIO; |
| 92 | 92 | ||
| 93 | pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, &status); | 93 | pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, &status); |
| 94 | pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_SEVER, &mask); | 94 | if (status) |
| 95 | if (dev->error_state == pci_channel_io_normal) | 95 | pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, status); |
| 96 | status &= ~mask; /* Clear corresponding nonfatal bits */ | ||
| 97 | else | ||
| 98 | status &= mask; /* Clear corresponding fatal bits */ | ||
| 99 | pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, status); | ||
| 100 | 96 | ||
| 101 | return 0; | 97 | return 0; |
| 102 | } | 98 | } |
