2006-07-30 Martin Mares <mj@ucw.cz>
+ * lspci.c, lib/header.h: Added support for the `bridge subsystem ID'
+ capability. Contributed by Petr Vandrovec.
+
* lspci.c (show_htype1): Fixed bug in printing of 64-bit prefetchable
memory windows. Fix by Petr Vandrovec.
#define PCI_CAP_ID_VNDR 0x09 /* Vendor specific */
#define PCI_CAP_ID_DBG 0x0A /* Debug port */
#define PCI_CAP_ID_CCRC 0x0B /* CompactPCI Central Resource Control */
+#define PCI_CAP_ID_SSVID 0x0D /* Bridge subsystem vendor/device ID */
#define PCI_CAP_ID_AGP3 0x0E /* AGP 8x */
#define PCI_CAP_ID_EXP 0x10 /* PCI Express */
#define PCI_CAP_ID_MSIX 0x11 /* MSI-X */
#define PCI_MSIX_PBA 8
#define PCI_MSIX_BIR 0x7
+/* Subsystem vendor/device ID for PCI bridges */
+#define PCI_SSVID_VENDOR 4
+#define PCI_SSVID_DEVICE 6
+
/* Advanced Error Reporting */
#define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */
#define PCI_ERR_UNC_TRAIN 0x00000001 /* Training */
chs);
}
+static void
+show_ssvid(struct device *d, int where)
+{
+ u16 subsys_v, subsys_d;
+ char ssnamebuf[256];
+
+ if (!config_fetch(d, where, 8))
+ return;
+ subsys_v = get_conf_word(d, where + PCI_SSVID_VENDOR);
+ subsys_d = get_conf_word(d, where + PCI_SSVID_DEVICE);
+ printf("Subsystem: %s\n",
+ pci_lookup_name(pacc, ssnamebuf, sizeof(ssnamebuf),
+ PCI_LOOKUP_SUBSYSTEM | PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE,
+ d->dev->vendor_id, d->dev->device_id, subsys_v, subsys_d));
+}
+
static void
show_aer(struct device *d UNUSED, int where UNUSED)
{
case PCI_CAP_ID_DBG:
show_debug();
break;
+ case PCI_CAP_ID_SSVID:
+ show_ssvid(d, where);
+ break;
case PCI_CAP_ID_EXP:
show_express(d, where, cap);
can_have_ext_caps = 1;