]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
lspci: Print PCIe Interrupt Message Numbers consistently
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 18 Oct 2023 16:08:34 +0000 (11:08 -0500)
committerMartin Mares <mj@ucw.cz>
Wed, 18 Oct 2023 18:57:05 +0000 (20:57 +0200)
Several Capabilities include MSI/MSI-X Interrupt Message Numbers, which
were decoded in various ways:

  - MSI %02x                             PCIe Capability
  - IntMsg %d                            AER Capability
  - INT Msg #%d                          DPC Capability
  - Interrupt Message Number %03x        SR-IOV Capability
  - Interrupt Message Number %03x        DOE Capability

Print them all using the same format:

  + IntMsgNum %d

This better matches the "Interrupt Message Number" terminology used in the
spec, e.g., PCIe r6.0, sec 7.5.3.2.

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

index 6c5b73bf2dca925f34119b48b6bb35356716ffa3..fce9502bd29a8c1cfe1438323c5cb6c84414370a 100644 (file)
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -1436,7 +1436,7 @@ cap_express(struct device *d, int where, int cap)
     default:
       printf("Unknown type %d", type);
   }
-  printf(", MSI %02x\n", (cap & PCI_EXP_FLAGS_IRQ) >> 9);
+  printf(", IntMsgNum %d\n", (cap & PCI_EXP_FLAGS_IRQ) >> 9);
   if (verbose < 2)
     return type;
 
index 6028607e82179beda0acf1110ada22bc1c9c7f19..5bc7a690734989bfd35e7d3565bff41779aa85ab 100644 (file)
@@ -191,7 +191,7 @@ cap_aer(struct device *d, int where, int type)
 
       l = get_conf_long(d, where + PCI_ERR_ROOT_STATUS);
       printf("\t\tRootSta: CERcvd%c MultCERcvd%c UERcvd%c MultUERcvd%c\n"
-           "\t\t\t FirstFatal%c NonFatalMsg%c FatalMsg%c IntMsg %d\n",
+           "\t\t\t FirstFatal%c NonFatalMsg%c FatalMsg%c IntMsgNum %d\n",
            FLAG(l, PCI_ERR_ROOT_COR_RCV),
            FLAG(l, PCI_ERR_ROOT_MULTI_COR_RCV),
            FLAG(l, PCI_ERR_ROOT_UNCOR_RCV),
@@ -221,7 +221,7 @@ static void cap_dpc(struct device *d, int where)
     return;
 
   l = get_conf_word(d, where + PCI_DPC_CAP);
-  printf("\t\tDpcCap:\tINT Msg #%d, RPExt%c PoisonedTLP%c SwTrigger%c RP PIO Log %d, DL_ActiveErr%c\n",
+  printf("\t\tDpcCap:\tIntMsgNum %d, RPExt%c PoisonedTLP%c SwTrigger%c RP PIO Log %d, DL_ActiveErr%c\n",
     PCI_DPC_CAP_INT_MSG(l), FLAG(l, PCI_DPC_CAP_RP_EXT), FLAG(l, PCI_DPC_CAP_TLP_BLOCK),
     FLAG(l, PCI_DPC_CAP_SW_TRIGGER), PCI_DPC_CAP_RP_LOG(l), FLAG(l, PCI_DPC_CAP_DL_ACT_ERR));
 
@@ -371,7 +371,7 @@ cap_sriov(struct device *d, int where)
     return;
 
   l = get_conf_long(d, where + PCI_IOV_CAP);
-  printf("\t\tIOVCap:\tMigration%c 10BitTagReq%c Interrupt Message Number: %03x\n",
+  printf("\t\tIOVCap:\tMigration%c 10BitTagReq%c IntMsgNum %d\n",
        FLAG(l, PCI_IOV_CAP_VFM), FLAG(l, PCI_IOV_CAP_VF_10BIT_TAG_REQ), PCI_IOV_CAP_IMN(l));
   w = get_conf_word(d, where + PCI_IOV_CTRL);
   printf("\t\tIOVCtl:\tEnable%c Migration%c Interrupt%c MSE%c ARIHierarchy%c 10BitTagReq%c\n",
@@ -1394,7 +1394,7 @@ cap_doe(struct device *d, int where)
   printf("\t\tDOECap: IntSup%c\n",
         FLAG(l, PCI_DOE_CAP_INT_SUPP));
   if (l & PCI_DOE_CAP_INT_SUPP)
-    printf("\t\t\tInterrupt Message Number %03x\n",
+    printf("\t\t\tIntMsgNum %d\n",
           PCI_DOE_CAP_INT_MSG(l));
 
   l = get_conf_long(d, where + PCI_DOE_CTL);