From 31c9bb289654b740f7562e98ba5302423cc1d50f Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 19 Oct 2007 11:01:25 +0200 Subject: [PATCH] Decode the Debug port capability (per EHCI 0.96 spec). --- ChangeLog | 2 ++ lspci.c | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 73c363d..f52f51d 100644 --- 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 * lib/[fno]bsd-*: Removed extraneous braces. diff --git a/lspci.c b/lspci.c index 7b2461d..a154527 100644 --- 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"); -- 2.39.2