Commit 387c72cd authored by Keith Busch's avatar Keith Busch Committed by Bjorn Helgaas

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/20210104230300.1277180-4-kbusch@kernel.orgReported-by: default avatarHinko Kocevar <hinko.kocevar@ess.eu>
Tested-by: default avatarHedi Berriche <hedi.berriche@hpe.com>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarSean V Kelley <sean.v.kelley@intel.com>
Acked-by: default avatarHedi Berriche <hedi.berriche@hpe.com>
parent 7a8a22be
...@@ -198,8 +198,7 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev, ...@@ -198,8 +198,7 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,
pci_dbg(bridge, "broadcast error_detected message\n"); pci_dbg(bridge, "broadcast error_detected message\n");
if (state == pci_channel_io_frozen) { if (state == pci_channel_io_frozen) {
pci_walk_bridge(bridge, report_frozen_detected, &status); pci_walk_bridge(bridge, report_frozen_detected, &status);
status = reset_subordinates(bridge); if (reset_subordinates(bridge) != PCI_ERS_RESULT_RECOVERED) {
if (status != PCI_ERS_RESULT_RECOVERED) {
pci_warn(bridge, "subordinate device reset failed\n"); pci_warn(bridge, "subordinate device reset failed\n");
goto failed; goto failed;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment