From fa2273ca93c0f910085911f25d1a3c75c464c983 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 19 Oct 2007 10:46:14 +0200 Subject: [PATCH] Incomplete decoding of several capabilities is marked with . --- ChangeLog | 7 +++++++ lspci.c | 60 ++++++++++++++++++++++++++----------------------------- lspci.man | 13 ++++++++++++ 3 files changed, 48 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index f57a0ac..73c363d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,13 @@ * lib/header.h: Include `PCI hot-plug' and `Secure device' capabilities from PCI 3.0 specs. + * lspci.c: All known capabilities have at least their name displayed + now. When we are unable to decode them completely, we signalize it + with a `' mark. + + * lspci.man: Document `' and also mention that extended config + space is currently available only with the linux_sysfs back-end. + 2007-10-14 Martin Mares * lib/[fno]bsd-*: Removed extraneous braces. diff --git a/lspci.c b/lspci.c index 7ffbcdf..7b2461d 100644 --- a/lspci.c +++ b/lspci.c @@ -1055,16 +1055,6 @@ show_msi(struct device *d, int where, int cap) } } -static void show_vendor(void) -{ - printf("Vendor Specific Information\n"); -} - -static void show_debug(void) -{ - printf("Debug port\n"); -} - static float power_limit(int value, int scale) { static const float scales[4] = { 1.0, 0.1, 0.01, 0.001 }; @@ -1445,46 +1435,37 @@ show_ext_caps(struct device *d) switch (id) { case PCI_EXT_CAP_ID_AER: - printf("Advanced Error Reporting\n"); - /* FIXME: Not decoded yet */ + printf("Advanced Error Reporting \n"); break; case PCI_EXT_CAP_ID_VC: - printf("Virtual Channel\n"); - /* FIXME: Not decoded yet */ + printf("Virtual Channel \n"); break; case PCI_EXT_CAP_ID_DSN: show_dsn(d, where); break; case PCI_EXT_CAP_ID_PB: - printf("Power Budgeting\n"); - /* FIXME: Not decoded yet */ + printf("Power Budgeting \n"); break; case PCI_EXT_CAP_ID_RCLINK: - printf("Root Complex Link\n"); - /* FIXME: Not decoded yet */ + printf("Root Complex Link \n"); break; case PCI_EXT_CAP_ID_RCILINK: - printf("Root Complex Internal Link\n"); - /* FIXME: Not decoded yet */ + printf("Root Complex Internal Link \n"); break; case PCI_EXT_CAP_ID_RCECOLL: - printf("Root Complex Event Collector\n"); - /* FIXME: Not decoded yet */ + printf("Root Complex Event Collector \n"); break; case PCI_EXT_CAP_ID_MFVC: - printf("Multi-Function Virtual Channel\n"); - /* FIXME: Not decoded yet */ + printf("Multi-Function Virtual Channel \n"); break; case PCI_EXT_CAP_ID_RBCB: - printf("Root Bridge Control Block\n"); - /* FIXME: Not decoded yet */ + printf("Root Bridge Control Block \n"); break; case PCI_EXT_CAP_ID_VNDR: - printf("Vendor Specific Information\n"); + printf("Vendor Specific Information \n"); break; case PCI_EXT_CAP_ID_ACS: - printf("Access Controls\n"); - /* FIXME: Not decoded yet */ + printf("Access Controls \n"); break; default: printf("#%02x\n", id); @@ -1536,7 +1517,7 @@ show_caps(struct device *d) show_agp(d, where, cap); break; case PCI_CAP_ID_VPD: - printf("Vital Product Data\n"); + printf("Vital Product Data \n"); break; case PCI_CAP_ID_SLOTID: show_slotid(cap); @@ -1544,6 +1525,9 @@ show_caps(struct device *d) case PCI_CAP_ID_MSI: show_msi(d, where, cap); break; + case PCI_CAP_ID_CHSWP: + printf("CompactPCI hot-swap \n"); + break; case PCI_CAP_ID_PCIX: show_pcix(d, where); can_have_ext_caps = 1; @@ -1552,14 +1536,26 @@ show_caps(struct device *d) show_ht(d, where, cap); break; case PCI_CAP_ID_VNDR: - show_vendor(); + printf("Vendor Specific Information \n"); break; case PCI_CAP_ID_DBG: - show_debug(); + printf("Debug port \n"); + break; + case PCI_CAP_ID_CCRC: + printf("CompactPCI central resource control \n"); + break; + case PCI_CAP_ID_HOTPLUG: + printf("Hot-plug capable\n"); break; case PCI_CAP_ID_SSVID: show_ssvid(d, where); break; + case PCI_CAP_ID_AGP3: + printf("AGP3 \n"); + break; + case PCI_CAP_ID_SECURE: + printf("Secure device \n"); + break; case PCI_CAP_ID_EXP: show_express(d, where, cap); can_have_ext_caps = 1; diff --git a/lspci.man b/lspci.man index 209294b..1583a54 100644 --- a/lspci.man +++ b/lspci.man @@ -309,6 +309,19 @@ kernels. Contains per-bus subdirectories with per-card config space files and a .I devices file containing a list of all PCI devices. +.SH BUGS + +Sometimes, lspci is not able to decode the configuration registers completely. +This usually happens when not enough documentation was available to the authors. +In such cases, it at least prints the +.B +mark to signal that there is potentially something more to say. If you know +the details, patches will be of course welcome. + +Access to the extended configuration space is currently supported only by the +.B linux_sysfs +back-end. + .SH SEE ALSO .BR setpci (8), .BR update-pciids (8) -- 2.39.2