From: Abhinav Jain <jain.abhinav177@gmail.com>
To: mahesh@linux.ibm.com, oohall@gmail.com, bhelgaas@google.com,
linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: javier.carrasco.cruz@gmail.com, jain.abhinav177@gmail.com,
skhan@linuxfoundation.org
Subject: [PATCH v3] PCI/AER: Log error message if there are too many PCI devices with errors
Date: Wed, 5 Jun 2024 23:09:54 +0000 [thread overview]
Message-ID: <20240605230954.22911-1-jain.abhinav177@gmail.com> (raw)
Added pci_err() to log PCI device information on which iteration fails.
Added pci_err() to log note if there are too many failed devices.
Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
---
PATCH v2:
https://lore.kernel.org/all/20240605212344.21808-1-jain.abhinav177@gmail.com/
Changes since v2:
- Switched to pci_err() to log failing PCI device
- Included the historical note below the "---" line
- Fixed other style changes in the patch
---
drivers/pci/pcie/aer.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 8b820a74dd6b..0bca83827ac1 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -882,11 +882,13 @@ static int find_device_iter(struct pci_dev *dev, void *data)
struct aer_err_info *e_info = (struct aer_err_info *)data;
if (is_error_source(dev, e_info)) {
+ /* Log error for the device */
+ pci_err(dev, "Error detected on device: %s\n", pci_name(dev));
+
/* List this device */
if (add_error_device(e_info, dev)) {
/* We cannot handle more... Stop iteration */
- pr_notice("%s: Cannot handle more devices - iteration stopped\n",
- __func__);
+ pci_err(dev, "Too many error devices encountered. Stopping iteration.\n");
return 1;
}
--
2.34.1
reply other threads:[~2024-06-05 23:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240605230954.22911-1-jain.abhinav177@gmail.com \
--to=jain.abhinav177@gmail.com \
--cc=bhelgaas@google.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.ibm.com \
--cc=oohall@gmail.com \
--cc=skhan@linuxfoundation.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).