Commit e4b12ea3 authored by Keith Busch's avatar Keith Busch Committed by Song, Youquan
Browse files

PCI/ERR: Retain status from error notification

mainline inclusion
from mainline-v5.12-rc1
commit 387c72cd
category: bugfix
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5V39J
CVE: NA

Intel-SIG: commit 387c72cd PCI/ERR: Retain status from error
notification.
Backport for kernel PCIe eDPC bug fix on ICX and SPR.

--------------------------------

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.org


Reported-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>
Signed-off-by: default avatarYouquan Song <youquan.song@intel.com>
parent 7e352987
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
		}