]> mj.ucw.cz Git - pciutils.git/commitdiff
Decode the Debug port capability (per EHCI 0.96 spec).
authorMartin Mares <mj@ucw.cz>
Fri, 19 Oct 2007 09:01:25 +0000 (11:01 +0200)
committerMartin Mares <mj@ucw.cz>
Fri, 19 Oct 2007 09:01:25 +0000 (11:01 +0200)
ChangeLog
lspci.c

index 73c363dc23f897baacb51b02082cfe4c7d12c9c0..f52f51d2a6bfdd5b131395011007ce57bdcedc4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@
        * lspci.man: Document `<?>' and also mention that extended config
        space is currently available only with the linux_sysfs back-end.
 
+       * lspci.c: Decode the Debug port capability (per EHCI 0.96 spec).
+
 2007-10-14  Martin Mares <mj@ucw.cz>
 
        * lib/[fno]bsd-*: Removed extraneous braces.
diff --git a/lspci.c b/lspci.c
index 7b2461da589c4458ece74832dd35cf3c0fdc0f3f..a154527b96b0b897e327d9c883819bd64736a897 100644 (file)
--- a/lspci.c
+++ b/lspci.c
@@ -1409,6 +1409,14 @@ show_dsn(struct device *d, int where)
        t2 & 0xff, (t2 >> 8) & 0xff, (t2 >> 16) & 0xff, t2 >> 24);
 }
 
+static void
+show_debug_port(int cap)
+{
+  int bar = cap >> 13;
+  int pos = cap & 0x1fff;
+  printf("Debug port: BAR=%d offset=%04x\n", bar, pos);
+}
+
 static void
 show_ext_caps(struct device *d)
 {
@@ -1539,7 +1547,7 @@ show_caps(struct device *d)
              printf("Vendor Specific Information <?>\n");
              break;
            case PCI_CAP_ID_DBG:
-             printf("Debug port <?>\n");
+             show_debug_port(cap);
              break;
            case PCI_CAP_ID_CCRC:
              printf("CompactPCI central resource control <?>\n");