]> mj.ucw.cz Git - pciutils.git/commitdiff
lspci: Make DevCtl, DevSta, and AER decoding more consistent
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 31 Jan 2018 21:19:13 +0000 (15:19 -0600)
committerMartin Mares <mj@ucw.cz>
Fri, 2 Mar 2018 11:30:22 +0000 (12:30 +0100)
Change DevCtl error reporting enables so they match the corresponding
DevSta bits:

-  DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
+  DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-

PCIe r4.0, sec 6.2.2, classifies errors as Correctable or Uncorrectable.
Uncorrectable includes both Non-Fatal and Fatal errors.  Decode the DevSta
"Non-Fatal Error Detected" bit as "NonFatalErr", not "UncorrErr":

-  DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
+  DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr- TransPend-

Change the "Unsupported" and "UnsuppReq" labels in DevCtl and DevSta to
match the "UnsupReq" used in AER.

The Correctable error category doesn't include Non-Fatal errors, so change
the AER Correctable Error Status "Advisory Non-Fatal Error Status" from
"NonFatalErr" to "AdvNonFatalErr":

-  CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+  CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
ls-caps.c
ls-ecaps.c

index d4aebc8e80753d9319923fbf8d25fd5c8e2e3e8f..158ac38f864291723c02366e0d01f473dde98c6f 100644 (file)
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -686,7 +686,7 @@ static void cap_express_dev(struct device *d, int where, int type)
   printf("\n");
 
   w = get_conf_word(d, where + PCI_EXP_DEVCTL);
-  printf("\t\tDevCtl:\tReport errors: Correctable%c Non-Fatal%c Fatal%c Unsupported%c\n",
+  printf("\t\tDevCtl:\tCorrErr%c NonFatalErr%c FatalErr%c UnsupReq%c\n",
        FLAG(w, PCI_EXP_DEVCTL_CERE),
        FLAG(w, PCI_EXP_DEVCTL_NFERE),
        FLAG(w, PCI_EXP_DEVCTL_FERE),
@@ -707,7 +707,7 @@ static void cap_express_dev(struct device *d, int where, int type)
        128 << ((w & PCI_EXP_DEVCTL_READRQ) >> 12));
 
   w = get_conf_word(d, where + PCI_EXP_DEVSTA);
-  printf("\t\tDevSta:\tCorrErr%c UncorrErr%c FatalErr%c UnsuppReq%c AuxPwr%c TransPend%c\n",
+  printf("\t\tDevSta:\tCorrErr%c NonFatalErr%c FatalErr%c UnsupReq%c AuxPwr%c TransPend%c\n",
        FLAG(w, PCI_EXP_DEVSTA_CED),
        FLAG(w, PCI_EXP_DEVSTA_NFED),
        FLAG(w, PCI_EXP_DEVSTA_FED),
index 634db21dd1b239ae0c408727bc5136ef0240b66e..800a0322e1b77076bd2b8a28b12e56bf85762e97 100644 (file)
@@ -124,11 +124,11 @@ cap_aer(struct device *d, int where, int type)
        FLAG(l, PCI_ERR_UNC_UNX_COMP), FLAG(l, PCI_ERR_UNC_RX_OVER), FLAG(l, PCI_ERR_UNC_MALF_TLP),
        FLAG(l, PCI_ERR_UNC_ECRC), FLAG(l, PCI_ERR_UNC_UNSUP), FLAG(l, PCI_ERR_UNC_ACS_VIOL));
   l = get_conf_long(d, where + PCI_ERR_COR_STATUS);
-  printf("\t\tCESta:\tRxErr%c BadTLP%c BadDLLP%c Rollover%c Timeout%c NonFatalErr%c\n",
+  printf("\t\tCESta:\tRxErr%c BadTLP%c BadDLLP%c Rollover%c Timeout%c AdvNonFatalErr%c\n",
        FLAG(l, PCI_ERR_COR_RCVR), FLAG(l, PCI_ERR_COR_BAD_TLP), FLAG(l, PCI_ERR_COR_BAD_DLLP),
        FLAG(l, PCI_ERR_COR_REP_ROLL), FLAG(l, PCI_ERR_COR_REP_TIMER), FLAG(l, PCI_ERR_COR_REP_ANFE));
   l = get_conf_long(d, where + PCI_ERR_COR_MASK);
-  printf("\t\tCEMsk:\tRxErr%c BadTLP%c BadDLLP%c Rollover%c Timeout%c NonFatalErr%c\n",
+  printf("\t\tCEMsk:\tRxErr%c BadTLP%c BadDLLP%c Rollover%c Timeout%c AdvNonFatalErr%c\n",
        FLAG(l, PCI_ERR_COR_RCVR), FLAG(l, PCI_ERR_COR_BAD_TLP), FLAG(l, PCI_ERR_COR_BAD_DLLP),
        FLAG(l, PCI_ERR_COR_REP_ROLL), FLAG(l, PCI_ERR_COR_REP_TIMER), FLAG(l, PCI_ERR_COR_REP_ANFE));
   l = get_conf_long(d, where + PCI_ERR_CAP);