From 138c0385ee743a772df323d12096b82201d0fc17 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 28 May 2004 10:45:38 +0000 Subject: [PATCH] Decode all bits in type 1 headers lspci.c: Decode all bits of the secondary status word in type 1 headers. Thanks to Maciej W. Rozycki for the patch. git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-38 --- ChangeLog | 5 +++++ Makefile | 6 +++--- TODO | 2 ++ lib/header.h | 2 +- lspci.c | 18 +++++++++++++++--- 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index e22207b..8afa151 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-05-28 Martin Mares + + * lspci.c: Decode all bits of the secondary status word in type 1 headers. + Thanks to Maciej W. Rozycki for the patch. + 2003-12-27 Martin Mares * Released as 2.1.99-test3. diff --git a/Makefile b/Makefile index cb824e9..7ff7207 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ # Makefile for The PCI Utilities -# (c) 1998--2003 Martin Mares +# (c) 1998--2004 Martin Mares OPT=-O2 -fomit-frame-pointer CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Winline -VERSION=2.1.99-test3 -DATE=2003-12-27 +VERSION=2.1.99-test4 +DATE=2004-05-28 PREFIX=/usr/local SBINDIR=$(PREFIX)/sbin diff --git a/TODO b/TODO index 8415024..3023306 100644 --- a/TODO +++ b/TODO @@ -6,3 +6,5 @@ - names.c: rewrite - spelling: buses x busses + +- update the web page diff --git a/lib/header.h b/lib/header.h index 5fb4101..5ffd06a 100644 --- a/lib/header.h +++ b/lib/header.h @@ -109,7 +109,7 @@ #define PCI_IO_RANGE_TYPE_16 0x00 #define PCI_IO_RANGE_TYPE_32 0x01 #define PCI_IO_RANGE_MASK ~0x0f -#define PCI_SEC_STATUS 0x1e /* Secondary status register, only bit 14 used */ +#define PCI_SEC_STATUS 0x1e /* Secondary status register */ #define PCI_MEMORY_BASE 0x20 /* Memory range behind */ #define PCI_MEMORY_LIMIT 0x22 #define PCI_MEMORY_RANGE_TYPE_MASK 0x0f diff --git a/lspci.c b/lspci.c index 3fde622..5d1a0fc 100644 --- a/lspci.c +++ b/lspci.c @@ -1,7 +1,7 @@ /* * The PCI Utilities -- List All PCI Devices * - * Copyright (c) 1997--2003 Martin Mares + * Copyright (c) 1997--2004 Martin Mares * * Can be freely distributed and used under the terms of the GNU GPL. */ @@ -688,6 +688,7 @@ show_htype1(struct device *d) u32 pref_base = get_conf_word(d, PCI_PREF_MEMORY_BASE); u32 pref_limit = get_conf_word(d, PCI_PREF_MEMORY_LIMIT); u32 pref_type = pref_base & PCI_PREF_RANGE_TYPE_MASK; + word sec_stat = get_conf_word(d, PCI_SEC_STATUS); word brc = get_conf_word(d, PCI_BRIDGE_CONTROL); int verb = verbose > 2; @@ -745,8 +746,19 @@ show_htype1(struct device *d) } } - if (get_conf_word(d, PCI_SEC_STATUS) & PCI_STATUS_SIG_SYSTEM_ERROR) - printf("\tSecondary status: SERR\n"); + if (verbose > 1) + printf("\tSecondary status: 66Mhz%c FastB2B%c ParErr%c DEVSEL=%s >TAbort%c SERR%c