[PATCH] PCI: Clear AER uncorrectable status according to error types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The AER recovery process use pci_aer_clear_nonfatal_status() to clear
non-fatal error status after successfully recovering from non-fatal error.
However, the fatal error status clearing for successful recovery of AER
fatal error was overlooked.
Therefore, this patch wants:
When the error type is non-fatal, use pci_aer_clear_nonfatal_status()
to clear non-fatal error status.
When the error type is fatal, use pci_aer_clear_fatal_status()
to clear fatal error status.

Signed-off-by: Songyang Li <leesongyang@xxxxxxxxxxx>
---
 drivers/pci/pcie/err.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
 mode change 100644 => 100755 drivers/pci/pcie/err.c

diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c
old mode 100644
new mode 100755
index 31090770fffc..14e1e0daecb8
--- a/drivers/pci/pcie/err.c
+++ b/drivers/pci/pcie/err.c
@@ -258,7 +258,10 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,
 	 */
 	if (host->native_aer || pcie_ports_native) {
 		pcie_clear_device_status(dev);
-		pci_aer_clear_nonfatal_status(dev);
+		if (state == pci_channel_io_normal)
+			pci_aer_clear_nonfatal_status(dev);
+		else if (state == pci_channel_io_frozen)
+			pci_aer_clear_fatal_status(dev);
 	}
 
 	pci_walk_bridge(bridge, pci_pm_runtime_put, NULL);
-- 
2.34.1





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux