From e306e911095588183024e33e62bfc93e4d85644f Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 22 Sep 1999 08:00:49 +0000 Subject: [PATCH] * pci.ids: New ID's. As usually. * lspci.c (show_htype1, show_htype2): Don't show `closed' bridge windows unless we're vvvery verbose. --- ChangeLog | 11 +++++++++++ Makefile | 6 +++--- lspci.c | 43 ++++++++++++++++++++++++------------------- pci.ids | 44 +++++++++++++++++++++++++++++++++++++++----- 4 files changed, 77 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index f56508a..b4becf7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Wed Sep 22 09:45:24 1999 Martin Mares + + * pci.ids: New ID's. As usually. + + * lspci.c (show_htype1, show_htype2): Don't show `closed' bridge windows + unless we're vvvery verbose. + +Mon Sep 20 11:22:54 1999 Martin Mares + + * lspci.c (show_htype2): Don't forget a TAB before the "I/O window" line. + Tue Sep 14 09:31:01 1999 Martin Mares * pci.ids: New ID's. Again. diff --git a/Makefile b/Makefile index 6a8e437..21669a1 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.21 1999/08/31 06:00:00 ecd Exp $ +# $Id: Makefile,v 1.22 1999/09/22 08:00:51 mj Exp $ # Makefile for Linux PCI Utilities # (c) 1998--1999 Martin Mares @@ -6,10 +6,10 @@ OPT=-O2 -fomit-frame-pointer #OPT=-O2 -g CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Werror -VERSION=2.1-pre5 +VERSION=2.1-pre6 SUFFIX= #SUFFIX=-alpha -DATE=1999-07-20 +DATE=1999-09-22 ifeq ($(shell uname),FreeBSD) ROOT=/usr/local diff --git a/lspci.c b/lspci.c index 3c07629..88353e8 100644 --- a/lspci.c +++ b/lspci.c @@ -1,5 +1,5 @@ /* - * $Id: lspci.c,v 1.28 1999/08/20 08:30:44 mj Exp $ + * $Id: lspci.c,v 1.29 1999/09/22 08:00:53 mj Exp $ * * Linux PCI Utilities -- List All PCI Devices * @@ -536,6 +536,7 @@ show_htype1(struct device *d) u32 pref_limit = get_conf_word(d, PCI_PREF_MEMORY_LIMIT); u32 pref_type = pref_base & PCI_PREF_RANGE_TYPE_MASK; word brc = get_conf_word(d, PCI_BRIDGE_CONTROL); + int verb = verbose > 2; show_bases(d, 2); printf("\tBus: primary=%02x, secondary=%02x, subordinate=%02x, sec-latency=%d\n", @@ -556,35 +557,39 @@ show_htype1(struct device *d) io_base |= (get_conf_word(d, PCI_IO_BASE_UPPER16) << 16); io_limit |= (get_conf_word(d, PCI_IO_LIMIT_UPPER16) << 16); } - if (io_base) + if (io_base <= io_limit || verb) printf("\tI/O behind bridge: %08x-%08x\n", io_base, io_limit+0xfff); } if (mem_type != (mem_limit & PCI_MEMORY_RANGE_TYPE_MASK) || mem_type) printf("\t!!! Unknown memory range types %x/%x\n", mem_base, mem_limit); - else if (mem_base) + else { mem_base = (mem_base & PCI_MEMORY_RANGE_MASK) << 16; mem_limit = (mem_limit & PCI_MEMORY_RANGE_MASK) << 16; - printf("\tMemory behind bridge: %08x-%08x\n", mem_base, mem_limit + 0xfffff); + if (mem_base <= mem_limit || verb) + printf("\tMemory behind bridge: %08x-%08x\n", mem_base, mem_limit + 0xfffff); } if (pref_type != (pref_limit & PCI_PREF_RANGE_TYPE_MASK) || (pref_type != PCI_PREF_RANGE_TYPE_32 && pref_type != PCI_PREF_RANGE_TYPE_64)) printf("\t!!! Unknown prefetchable memory range types %x/%x\n", pref_base, pref_limit); - else if (pref_base) + else { pref_base = (pref_base & PCI_PREF_RANGE_MASK) << 16; pref_limit = (pref_limit & PCI_PREF_RANGE_MASK) << 16; - if (pref_type == PCI_PREF_RANGE_TYPE_32) - printf("\tPrefetchable memory behind bridge: %08x-%08x\n", pref_base, pref_limit + 0xfffff); - else - printf("\tPrefetchable memory behind bridge: %08x%08x-%08x%08x\n", - get_conf_long(d, PCI_PREF_BASE_UPPER32), - pref_base, - get_conf_long(d, PCI_PREF_LIMIT_UPPER32), - pref_limit); + if (pref_base <= pref_limit || verb) + { + if (pref_type == PCI_PREF_RANGE_TYPE_32) + printf("\tPrefetchable memory behind bridge: %08x-%08x\n", pref_base, pref_limit + 0xfffff); + else + printf("\tPrefetchable memory behind bridge: %08x%08x-%08x%08x\n", + get_conf_long(d, PCI_PREF_BASE_UPPER32), + pref_base, + get_conf_long(d, PCI_PREF_LIMIT_UPPER32), + pref_limit); + } } if (get_conf_word(d, PCI_SEC_STATUS) & PCI_STATUS_SIG_SYSTEM_ERROR) @@ -612,6 +617,7 @@ show_htype2(struct device *d) word cmd = get_conf_word(d, PCI_COMMAND); word brc = get_conf_word(d, PCI_CB_BRIDGE_CONTROL); word exca = get_conf_word(d, PCI_CB_LEGACY_MODE_BASE); + int verb = verbose > 2; show_bases(d, 1); printf("\tBus: primary=%02x, secondary=%02x, subordinate=%02x, sec-latency=%d\n", @@ -624,7 +630,7 @@ show_htype2(struct device *d) int p = 8*i; u32 base = get_conf_long(d, PCI_CB_MEMORY_BASE_0 + p); u32 limit = get_conf_long(d, PCI_CB_MEMORY_LIMIT_0 + p); - if (limit > base) + if (limit > base || verb) printf("Memory window %d: %08x-%08x%s%s\n", i, base, limit, (cmd & PCI_COMMAND_MEMORY) ? "" : " [disabled]", (brc & (PCI_CB_BRIDGE_CTL_PREFETCH_MEM0 << i)) ? " (prefetchable)" : ""); @@ -640,11 +646,10 @@ show_htype2(struct device *d) limit &= 0xffff; } base &= PCI_CB_IO_RANGE_MASK; - if (!base) - continue; limit = (limit & PCI_CB_IO_RANGE_MASK) + 3; - printf("I/O window %d: %08x-%08x%s\n", i, base, limit, - (cmd & PCI_COMMAND_IO) ? "" : " [disabled]"); + if (base <= limit || verb) + printf("\tI/O window %d: %08x-%08x%s\n", i, base, limit, + (cmd & PCI_COMMAND_IO) ? "" : " [disabled]"); } if (get_conf_word(d, PCI_CB_SEC_STATUS) & PCI_STATUS_SIG_SYSTEM_ERROR) @@ -714,7 +719,7 @@ show_verbose(struct device *d) return; } - if (verbose && subsys_v && subsys_v != 0xffff) + if (subsys_v && subsys_v != 0xffff) printf("\tSubsystem: %s\n", pci_lookup_name(pacc, ssnamebuf, sizeof(ssnamebuf), PCI_LOOKUP_SUBSYSTEM | PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE, diff --git a/pci.ids b/pci.ids index af94ba5..b064a8c 100644 --- a/pci.ids +++ b/pci.ids @@ -4,7 +4,7 @@ # Maintained by Martin Mares # If you have any new entries, send them to the maintainer. # -# $Id: pci.ids,v 1.36 1999/09/14 07:33:37 mj Exp $ +# $Id: pci.ids,v 1.37 1999/09/22 08:00:55 mj Exp $ # # Vendors and devices. Please keep sorted. @@ -1959,7 +1959,41 @@ 1305 Netphone, Inc 1306 Duet Technologies 1307 Computer Boards - 0001 DAS1602/16 + 0001 PCI-DAS1602/16 + 000C PCI-PDISO8 + 000D PCI-PDISO16 + 000B PCI-DIO48H + 000F PCI-DAS1200 + 0010 PCI-DAS1602/12 + 0014 PCI-DIO24H + 0015 PCI-DIO24H/CTR3 + 0016 PCI-DIO48H/CTR15 + 0017 PCI-DIO96H + 0018 PCI-CTR05 + 0019 PCI-DAS1200/JR + 001A PCI-DAS1001 + 001B PCI-DAS1002 + 001C PCI-DAS1602JR/16 + 001D PCI-DAS6402/16 + 001E PCI-DAS6402/12 + 001F PCI-DAS16/M1 + 0020 PCI-DDA02/12 + 0021 PCI-DDA04/12 + 0022 PCI-DDA08/12 + 0023 PCI-DDA02/16 + 0024 PCI-DDA04/16 + 0025 PCI-DDA08/16 + 0026 PCI-DAC04/12-HS + 0027 PCI-DAC04/16-HS + 0028 PCI-DIO24 + 0029 PCI-DAS08 + 002C PCI-INT32 + 0033 PCI-DUAL-AC5 + 0034 PCI-DAS-TC + 0035 PCI-DAS64/M1/16 + 0036 PCI-DAS64/M2/16 + 0037 PCI-DAS64/M3/16 + 004C PCI-DAS1000 1308 Jato Technologies Inc. 0001 NetCelerator Adapter 1309 AB Semiconductor Ltd @@ -2235,9 +2269,9 @@ 1405 Excalibur Systems Inc 1406 Oce' Printing Systems GmbH 1407 Lava Computer mfg Inc - 8000 Parallel port controller - 8001 Dual parallel port controller A - 8002 Dual parallel port controller B + 8000 Lava Parallel + 8002 Lava Dual Parallel port A + 8003 Lava Dual Parallel port B 1408 Aloka Co. Ltd 1409 Timedia Technology Co Ltd 140a DSP Research Inc -- 2.39.2