From: Keith Busch <kbusch@kernel.org>
To: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Cc: Keith Busch <kbusch@kernel.org>
Subject: [PATCH 1/3] PCI/ERR: Clear status of the reporting device
Date: Thu, 17 Dec 2020 09:14:29 -0800 [thread overview]
Message-ID: <20201217171431.502030-1-kbusch@kernel.org> (raw)
Error handling operates on the first downstream port above the detected
error, but the error may have been reported by a downstream device.
Clear the AER status of the device that reported the error rather than
the first downstream port.
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
drivers/pci/pcie/err.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c
index 510f31f0ef6d..a84f0bf4c1e2 100644
--- a/drivers/pci/pcie/err.c
+++ b/drivers/pci/pcie/err.c
@@ -231,15 +231,14 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,
pci_walk_bridge(bridge, report_resume, &status);
/*
- * If we have native control of AER, clear error status in the Root
- * Port or Downstream Port that signaled the error. If the
- * platform retained control of AER, it is responsible for clearing
- * this status. In that case, the signaling device may not even be
- * visible to the OS.
+ * If we have native control of AER, clear error status in the device
+ * that detected the error. If the platform retained control of AER,
+ * it is responsible for clearing this status. In that case, the
+ * signaling device may not even be visible to the OS.
*/
if (host->native_aer || pcie_ports_native) {
- pcie_clear_device_status(bridge);
- pci_aer_clear_nonfatal_status(bridge);
+ pcie_clear_device_status(dev);
+ pci_aer_clear_nonfatal_status(dev);
}
pci_info(bridge, "device recovery successful\n");
return status;
--
2.24.1
next reply other threads:[~2020-12-17 17:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 17:14 Keith Busch [this message]
2020-12-17 17:14 ` [PATCH 2/3] PCI/AER: Actually get the root port Keith Busch
2020-12-17 23:15 ` kernel test robot
2020-12-17 23:34 ` kernel test robot
2021-01-04 18:42 ` Kelley, Sean V
2021-01-04 22:05 ` Keith Busch
2021-01-04 22:10 ` Kelley, Sean V
2020-12-17 17:14 ` [PATCH 3/3] PCI/ERR: Retain status from error notification Keith Busch
2021-01-04 18:43 ` Kelley, Sean V
2021-01-05 14:12 ` Hinko Kocevar
2021-01-04 18:42 ` [PATCH 1/3] PCI/ERR: Clear status of the reporting device Kelley, Sean V
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201217171431.502030-1-kbusch@kernel.org \
--to=kbusch@kernel.org \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).