[PATCH v4 8/8] Revert "PCI/ERR: Update error status after reset_link()"
Andrey Grodzovsky
andrey.grodzovsky at amd.com
Wed Sep 2 18:42:10 UTC 2020
This reverts commit 6d2c89441571ea534d6240f7724f518936c44f8d.
In the code bellow
pci_walk_bus(bus, report_frozen_detected, &status);
- if (reset_link(dev, service) != PCI_ERS_RESULT_RECOVERED)
+ status = reset_link(dev, service);
status returned from report_frozen_detected is unconditionally masked
by status returned from reset_link which is wrong.
This breaks error recovery implementation for AMDGPU driver
by masking PCI_ERS_RESULT_NEED_RESET returned from amdgpu_pci_error_detected
and hence skiping slot reset callback which is necessary for proper
ASIC recovery. Effectively no other callback besides resume callback will
be called after link reset the way it is implemented now regardless of what
value error_detected callback returns.
In general step 6.1.4 describing link reset unlike the other steps is not well defined
in what are the expected return values and the appropriate next steps as
it is for other stpes.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
---
drivers/pci/pcie/err.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c
index c543f41..81dd719 100644
--- a/drivers/pci/pcie/err.c
+++ b/drivers/pci/pcie/err.c
@@ -165,8 +165,7 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,
pci_dbg(dev, "broadcast error_detected message\n");
if (state == pci_channel_io_frozen) {
pci_walk_bus(bus, report_frozen_detected, &status);
- status = reset_link(dev);
- if (status != PCI_ERS_RESULT_RECOVERED) {
+ if (reset_link(dev) != PCI_ERS_RESULT_RECOVERED) {
pci_warn(dev, "link reset failed\n");
goto failed;
}
--
2.7.4
More information about the amd-gfx
mailing list