diff options
author | Keith Busch <[email protected]> | 2021-01-04 15:02:58 -0800 |
---|---|---|
committer | Bjorn Helgaas <[email protected]> | 2021-02-23 17:10:42 -0600 |
commit | 387c72cdd7fb6bef650fb078d0f6ae9682abf631 (patch) | |
tree | 0de8c36bbbbbe4362564ca9c0177a8f24927d3f1 | |
parent | 7a8a22be35a5058366429e311017e05206c43137 (diff) |
PCI/ERR: Retain status from error notification
Overwriting the frozen detected status with the result of the link reset
loses the NEED_RESET result that drivers are depending on for error
handling to report the .slot_reset() callback. Retain this status so
that subsequent error handling has the correct flow.
Link: https://lore.kernel.org/r/[email protected]
Reported-by: Hinko Kocevar <[email protected]>
Tested-by: Hedi Berriche <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Sean V Kelley <[email protected]>
Acked-by: Hedi Berriche <[email protected]>
-rw-r--r-- | drivers/pci/pcie/err.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c index a84f0bf4c1e2..b576aa890c76 100644 --- a/drivers/pci/pcie/err.c +++ b/drivers/pci/pcie/err.c @@ -198,8 +198,7 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev, pci_dbg(bridge, "broadcast error_detected message\n"); if (state == pci_channel_io_frozen) { pci_walk_bridge(bridge, report_frozen_detected, &status); - status = reset_subordinates(bridge); - if (status != PCI_ERS_RESULT_RECOVERED) { + if (reset_subordinates(bridge) != PCI_ERS_RESULT_RECOVERED) { pci_warn(bridge, "subordinate device reset failed\n"); goto failed; } |