提交 7d78f964 编写于 作者: K Keith Busch 提交者: Zheng Zengkai

PCI/ERR: Retain status from error notification

stable inclusion
from stable-v5.10.138
commit 1daa7629d2a2a8bfcac5a70592275098afddd6cc
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60QFD

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1daa7629d2a2a8bfcac5a70592275098afddd6cc

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

commit 387c72cd upstream.

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: NHinko Kocevar <hinko.kocevar@ess.eu>
Tested-by: NHedi Berriche <hedi.berriche@hpe.com>
Signed-off-by: NKeith Busch <kbusch@kernel.org>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NSean V Kelley <sean.v.kelley@intel.com>
Acked-by: NHedi Berriche <hedi.berriche@hpe.com>
Cc: Dominique Martinet <dominique.martinet@atmark-techno.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 af50130d
...@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册