[<prev] [next>] [day] [month] [year] [list]
Message-ID:
<TY3P286MB2754DE49E4D1CB87C9256D21B4D62@TY3P286MB2754.JPNP286.PROD.OUTLOOK.COM>
Date: Wed, 26 Jun 2024 23:32:30 +0800
From: Songyang Li <leesongyang@...look.com>
To: bhelgaas@...gle.com
Cc: linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org,
leesongyang@...look.com
Subject: [PATCH] PCI: Clear AER uncorrectable status according to error types
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@...look.com>
---
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
Powered by blists - more mailing lists