]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
lspci: Decode Null Capability
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 19 Apr 2018 20:16:33 +0000 (15:16 -0500)
committerMartin Mares <mj@ucw.cz>
Fri, 20 Apr 2018 08:23:06 +0000 (10:23 +0200)
The PCI Code and ID Assignment spec, r1.9, sec 2, defines a "Null
Capability" containing no registers other than the 8-bit Capability ID
(00h) and an 8-bit Next Capability Pointer.

Some devices, e.g., the Intel [8086:2058] implement this Capability.

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

index 0b12b2ca2a30b93fd25b8792f71e97a38dfdb12f..1f0e4604e2e58c8b9e113a810719593de03d18c2 100644 (file)
 /* Capability lists */
 
 #define PCI_CAP_LIST_ID                0       /* Capability ID */
+#define  PCI_CAP_ID_NULL       0x00    /* Null Capability */
 #define  PCI_CAP_ID_PM         0x01    /* Power Management */
 #define  PCI_CAP_ID_AGP                0x02    /* Accelerated Graphics Port */
 #define  PCI_CAP_ID_VPD                0x03    /* Vital Product Data */
 
 /* Capabilities residing in the PCI Express extended configuration space */
 
+#define PCI_EXT_CAP_ID_NULL    0x00    /* Null Capability */
 #define PCI_EXT_CAP_ID_AER     0x01    /* Advanced Error Reporting */
 #define PCI_EXT_CAP_ID_VC      0x02    /* Virtual Channel */
 #define PCI_EXT_CAP_ID_DSN     0x03    /* Device Serial Number */
index bc7829c120e59844b104107920cda10e430d5d7e..8b707c29ad504d77707edb96ca441d25f8b9f95c 100644 (file)
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -1536,6 +1536,9 @@ show_caps(struct device *d, int where)
            }
          switch (id)
            {
+           case PCI_CAP_ID_NULL:
+             printf("Null\n");
+             break;
            case PCI_CAP_ID_PM:
              cap_pm(d, where, cap);
              break;
index cb3d46dd1be6c0e4ae79b56ab0ec145923c7e7cd..3f6a3644f2d5eabe21bb83713f32b2a0a01c28ee 100644 (file)
@@ -737,6 +737,9 @@ show_ext_caps(struct device *d, int type)
        }
       switch (id)
        {
+         case PCI_EXT_CAP_ID_NULL:
+           printf("Null\n");
+           break;
          case PCI_EXT_CAP_ID_AER:
            cap_aer(d, where, type);
            break;