linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: lvying <lvying6@huawei.com>
To: <mchehab@kernel.org>, <linux-edac@vger.kernel.org>
Cc: <guanyalong@huawei.com>
Subject: [PATCH] rasdaemon: decode AER error according to PCIe specifications
Date: Mon, 24 Feb 2020 12:09:29 +0800	[thread overview]
Message-ID: <1582517369-25825-1-git-send-email-lvying6@huawei.com> (raw)

Corrected/Uncorrected AER error should be decoded according to PCIe
specification: "Correctable/Uncorrectable Error severity Register",
kernel has already followed this specification.

lspci uses abbreviated naming for AER error strings.  Adopt the same naming
convention for the AER printing so they match.

Signed-off-by: lvying <lvying6@huawei.com>
---
 ras-aer-handler.c | 39 ++++++++++++++++++++++++---------------
 1 file changed, 24 insertions(+), 15 deletions(-)

diff --git a/ras-aer-handler.c b/ras-aer-handler.c
index 8ddd439..42a7218 100644
--- a/ras-aer-handler.c
+++ b/ras-aer-handler.c
@@ -29,27 +29,36 @@
 /* bit field meaning for correctable error */
 static const char *aer_cor_errors[32] = {
 	/* Correctable errors */
-	[0]  = "Receiver Error",
-	[6]  = "Bad TLP",
-	[7]  = "Bad DLLP",
-	[8]  = "RELAY_NUM Rollover",
-	[12] = "Replay Timer Timeout",
-	[13] = "Advisory Non-Fatal",
+	[0]  = "RxErr",
+	[6]  = "BadTLP",
+	[7]  = "BadDLLP",
+	[8]  = "Rollover",
+	[12] = "Timeout",
+	[13] = "NonFatalErr",
+	[14] = "CorrIntErr",
+	[15] = "HeaderOF",
 };
 
 /* bit field meaning for uncorrectable error */
 static const char *aer_uncor_errors[32] = {
 	/* Uncorrectable errors */
-	[4]  = "Data Link Protocol",
-	[12] = "Poisoned TLP",
-	[13] = "Flow Control Protocol",
-	[14] = "Completion Timeout",
-	[15] = "Completer Abort",
-	[16] = "Unexpected Completion",
-	[17] = "Receiver Overflow",
-	[18] = "Malformed TLP",
+	[0] = "Undefined",
+	[4] = "DLP",
+	[5] = "SDES",
+	[12] = "TLP",
+	[13] = "FCP",
+	[14] = "CmpltTO",
+	[15] = "CmpltAbrt",
+	[16] = "UnxCmplt",
+	[17] = "RxOF",
+	[18] = "MalfTLP",
 	[19] = "ECRC",
-	[20] = "Unsupported Request",
+	[20] = "UnsupReq",
+	[21] = "ACSViol",
+	[22] = "UncorrIntErr",
+	[23] = "BlockedTLP",
+	[24] = "AtomicOpBlocked",
+	[25] = "TLPBlockedErr",
 };
 
 #define BUF_LEN	1024
-- 
1.8.3.1


                 reply	other threads:[~2020-02-24  8:49 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=1582517369-25825-1-git-send-email-lvying6@huawei.com \
    --to=lvying6@huawei.com \
    --cc=guanyalong@huawei.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=mchehab@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).