pci.ids updates from Jens Maurer.
Released as version 1.02.
+Sun Feb 15 10:12:25 1998 Martin Mares <mj@albireo.ucw.cz>
+
+ * lspci.c (show_machine): Added non-verbose mode of machine-readable
+ dump.
+
+ * pci.ids: Updates from Jens Maurer.
+
+ * Released as version 1.02.
+
+Thu Feb 12 16:53:28 1998 Martin Mares <mj@lomikel.karlin.mff.cuni.cz>
+
+ * lspci.c: Added a "-m" switch for dumping machine-readable
+ configuration data (requested by Bjoern Kriews <bkr@cut.de>).
+
Mon Feb 9 13:17:43 1998 Martin Mares <mj@albireo.ucw.cz>
* Makefile, pciutils.h: Include local pci.h instead of <linux/pci.h>
-This package contains the Linux PCI Utilities, version 1.01.
+This package contains the Linux PCI Utilities, version 1.02.
Copyright (c) 1998 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
- Full displaying of CardBus bridge configuration. (Has anyone seen
full specs of the CardBus bridge / header type 2?)
+
+ - Subsystem vendor and device ID?
-.TH lspci 8 "9 February 98" "pciutils-1.01" "Linux PCI Utilities"
+.TH lspci 8 "15 February 98" "pciutils-1.02" "Linux PCI Utilities"
.IX lspci
.SH NAME
lspci \- list all PCI devices
Use
.B <dir>
as directory containing PCI bus information instead of /proc/bus/pci.
+.TP
+.B -m
+Dump PCI device data in machine readable form (both normal and verbose format supported)
+for easy parsing by scripts.
.SH FILES
.TP
/*
- * $Id: lspci.c,v 1.7 1998/02/09 12:32:54 mj Exp $
+ * $Id: lspci.c,v 1.8 1998/02/15 09:30:39 mj Exp $
*
* Linux PCI Utilities -- List All PCI Devices
*
static int vend_filter = -1;
static int dev_filter = -1;
static int show_tree; /* Show bus tree */
+static int machine_readable; /* Generate machine-readable output */
static char *pci_dir = PROC_BUS_PCI;
-static char options[] = "nvbxB:S:F:V:D:ti:p:";
+static char options[] = "nvbxB:S:F:V:D:ti:p:m";
static char help_msg[] = "\
Usage: lspci [<switches>]\n\
-x\tShow hex-dump of config space (-xx shows full 256 bytes)\n\
-B <bus>, -S <slot>, -F <func>, -V <vendor>, -D <device> Show only selected devices\n\
-t\tShow bus tree\n\
+-m\tProduce machine-readable output\n\
-i <file>\tUse specified ID database instead of " ETC_PCI_IDS "\n\
-p <dir>\tUse specified bus directory instead of " PROC_BUS_PCI "\n\
";
}
}
+static void
+show_machine(struct device *d)
+{
+ int c;
+
+ if (verbose)
+ {
+ printf("Device:\t%02x:%02x.%x\n", d->bus, PCI_SLOT(d->devfn), PCI_FUNC(d->devfn));
+ printf("Class:\t%s\n", lookup_class(get_conf_word(d, PCI_CLASS_DEVICE)));
+ printf("Vendor:\t%s\n", lookup_vendor(d->vendid));
+ printf("Device:\t%s\n", lookup_device(d->vendid, d->devid));
+ if (c = get_conf_byte(d, PCI_REVISION_ID))
+ printf("Rev:\t%02x\n", c);
+ if (c = get_conf_byte(d, PCI_CLASS_PROG))
+ printf("ProgIf:\t%02x\n", c);
+ }
+ else
+ {
+ printf("%02x:%02x.%x ", d->bus, PCI_SLOT(d->devfn), PCI_FUNC(d->devfn));
+ printf("\"%s\" \"%s\" \"%s\"",
+ lookup_class(get_conf_word(d, PCI_CLASS_DEVICE)),
+ lookup_vendor(d->vendid),
+ lookup_device(d->vendid, d->devid));
+ if (c = get_conf_byte(d, PCI_REVISION_ID))
+ printf(" -r%02x", c);
+ if (c = get_conf_byte(d, PCI_CLASS_PROG))
+ printf(" -p%02x", c);
+ putchar('\n');
+ }
+}
+
static void
show(void)
{
for(d=first_dev; d; d=d->next)
{
- if (verbose)
+ if (machine_readable)
+ show_machine(d);
+ else if (verbose)
show_verbose(d);
else
show_terse(d);
case 'p':
pci_dir = optarg;
break;
+ case 'm':
+ machine_readable++;
+ break;
default:
bad:
fprintf(stderr, help_msg);
#
# List of PCI ID's
#
-# Maintained by Jens Maurer <jmaurer@cck.uni-kl.de>
+# Maintained by Jens Maurer <linux-pcisupport@cck.uni-kl.de>
# If you have any new entries, send them to the maintainer.
#
-# $Id: pci.ids,v 1.4 1998/02/08 12:47:07 ecd Exp $
+# $Id: pci.ids,v 1.5 1998/02/15 09:30:40 mj Exp $
#
# Vendors and devices. Please keep sorted.
0016 DGLPB [OPPO]
0019 DECchip 21142/43
0021 DECchip 21052
+ 0022 DECchip 21150
0024 DECchip 21152
1012 Micronics Computers Inc
1013 Cirrus Logic
001d 82G2675
0020 MCA
0022 IBM27-82351
+ 002e ServeRAID controller
0036 Miami
+ 007d MPEG2
1015 LSI Logic Corp of Canada
1016 ICL Personal Systems
1017 SPEA Software AG
2040 79c974
1023 Trident Microsystems
9320 TGUI 9320
+ 9397 Cyber9397
9420 TGUI 9420
9430 TGUI 9430
9440 TGUI 9440
0001 SG86C201
0002 SG86C202
0008 85C503
+ 0200 5598
0204 82C204
0205 SG86C205
0406 85C501/2
3020 Samurai_IDE
1043 Asustek Computer, Inc.
1044 Distributed Processing Technology
- a400 PM2124A [SmartCache/Raid]
+ a400 SmartCache/Raid III or IV
1045 OPTi Inc.
c178 92C178
c557 82C557 [Viper-M]
ac12 PCI1130
ac13 PCI1031
ac15 PCI1131
+ ac16 PCI-1250
104d Sony Corporation
104e Oak Technology, Inc
0107 OTI107
109e Brooktree Corporation
0350 Bt848
0351 Bt849A
+ 8474 Bt8474
109f Trigem Computer Inc.
10a0 Meidensha Corporation
10a1 Juko Electronics Ind. Co. Ltd
0585 VT82C585VP [Apollo VP1/VPX]
0586 VT82C586 ISA [Apollo VP]
0595 VT82C595 [Apollo VP2]
+ 0597 VT82C597 [Apollo VP3]
0926 VT82C926 [Amazon]
1000 82C570MV
1106 82C570MV
1571 VT 82C416MV
1595 VT82C595/97 [Apollo VP2/97]
- 3038 82C586_2 [VT82C586B USB]
- 3040 82C586_3 [VT82C586B ACPI]
+ 3038 VT82C586B USB
+ 3040 VT82C586B ACPI
+ 8597 VT82C597 [Apollo VP3 AGP]
1107 Stratus Computers
1108 Proteon, Inc.
0100 p1690plus_AA
113a FWB Inc
113b Network Computing Devices
113c Cyclone Microsystems, Inc.
+ 0001 PCI-SDK [PCI i960 Evaluation Platform]
0911 PCI-911 [PCI-based i960Jx Intelligent I/O Controller]
0912 PCI-912 [i960CF-based Intelligent I/O Controller]
0913 PCI-913
1179 Toshiba America Info Systems
0601 601
060a ToPIC95
+ 060f ToPIC97
+ 0701 Lucent DSP1645 [Mars]
117b L G Electronics, Inc.
117c Atto Technology
117d Becton & Dickinson
11be International Microcircuits Inc
11bf Astrodesign, Inc.
11c0 Hewlett Packard
-11c1 AT&T Microelectronics
+11c1 Lucent Microelectronics
+ 0440 L56xMF
11c2 Sand Microelectronics
11c4 Document Technologies, Inc
11c5 Shiva Corporation
Begin3
Title: Linux PCI Utilities
-Version: 1.01
-Entered-date: 980209
+Version: 1.02
+Entered-date: 980215
Description: This package contains various utilities for inspecting and
setting of devices connected to the PCI bus. Requires
kernel version 2.1.82 or newer (supporting the /proc/bus/pci
Keywords: kernel, pci, proc, lspci
Author: mj@atrey.karlin.mff.cuni.cz (Martin Mares)
Maintained-by: mj@atrey.karlin.mff.cuni.cz (Martin Mares)
-Primary-site: atrey.karlin.mff.cuni.cz pub/local/mj/linux/pciutils-1.01.tar.gz
-Alternate-site: sunsite.unc.edu pub/Linux/system/hardware/pciutils-1.01.tar.gz
+Primary-site: atrey.karlin.mff.cuni.cz pub/local/mj/linux/pciutils-1.02.tar.gz
+Alternate-site: sunsite.unc.edu pub/Linux/system/hardware/pciutils-1.02.tar.gz
Copying-policy: GPL
End