[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220928105946.12469-9-chenzhuo.1@bytedance.com>
Date: Wed, 28 Sep 2022 18:59:45 +0800
From: Zhuo Chen <chenzhuo.1@...edance.com>
To: sathyanarayanan.kuppuswamy@...ux.intel.com, bhelgaas@...gle.com,
ruscur@...sell.cc, oohall@...il.com, fancer.lancer@...il.com,
jdmason@...zu.us, dave.jiang@...el.com, allenbh@...il.com,
james.smart@...adcom.com, dick.kennedy@...adcom.com,
jejb@...ux.ibm.com, martin.petersen@...cle.com
Cc: chenzhuo.1@...edance.com, linuxppc-dev@...ts.ozlabs.org,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
ntb@...ts.linux.dev, linux-scsi@...r.kernel.org
Subject: [PATCH v3 8/9] PCI/ERR: Clear fatal error status when pci_channel_io_frozen
When state is pci_channel_io_frozen in pcie_do_recovery(), the
severity is fatal and fatal error status should be cleared.
So add pci_aer_clear_fatal_status().
Signed-off-by: Zhuo Chen <chenzhuo.1@...edance.com>
---
drivers/pci/pcie/err.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c
index f80b21244ef1..b46f1d36c090 100644
--- a/drivers/pci/pcie/err.c
+++ b/drivers/pci/pcie/err.c
@@ -241,7 +241,10 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,
pci_walk_bridge(bridge, report_resume, &status);
pcie_clear_device_status(dev);
- pci_aer_clear_nonfatal_status(dev);
+ if (state == pci_channel_io_frozen)
+ pci_aer_clear_fatal_status(dev);
+ else
+ pci_aer_clear_nonfatal_status(dev);
pci_info(bridge, "device recovery successful\n");
return status;
--
2.30.1 (Apple Git-130)
Powered by blists - more mailing lists