Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] rasdaemon: decode AER error according to PCIe specifications
@ 2020-02-24  4:09 lvying
  0 siblings, 0 replies; only message in thread
From: lvying @ 2020-02-24  4:09 UTC (permalink / raw)
  To: mchehab, linux-edac; +Cc: guanyalong

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24  4:09 [PATCH] rasdaemon: decode AER error according to PCIe specifications lvying

Linux-EDAC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \
		linux-edac@vger.kernel.org
	public-inbox-index linux-edac

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git