From 152967235012b72c4c99f2d9631d19a2afc0ef8c Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 21 Sep 2005 12:05:23 +0000 Subject: [PATCH] Fixed 64 bit addresses and released as 2.2.0. git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-84 --- ChangeLog | 15 +++++++++++++++ Makefile | 4 ++-- lib/configure | 4 +--- lib/sysfs.c | 6 ------ lib/types.h | 4 ++-- lspci.c | 3 ++- 6 files changed, 22 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 430ac56..1cef53e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2005-09-21 Martin Mares + + * Released as 2.2.0. + + * lib/sysfs.c (sysfs_get_resources): Removed warning about unsupported + 64-bit addresses, they are now always supported. + + * lspci.c (show_bases): Corrected printing of 64-bit addresses + in bus-centric mode. + + * lib/configure: Enable 64-bit addresses on all Linux systems. + + * lib/types.h: Don't pad 64-bit addresses to 16 xigits, only to 8 if they + are shorter. + 2005-09-11 Martin Mares * Released as 2.1.99-test11. diff --git a/Makefile b/Makefile index 384d530..ae17fb1 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,8 @@ OPT=-O2 CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Winline -VERSION=2.1.99-test11 -DATE=2005-09-11 +VERSION=2.2.0 +DATE=2005-09-21 PREFIX=/usr/local SBINDIR=$(PREFIX)/sbin diff --git a/lib/configure b/lib/configure index 73efcc8..ecd3503 100755 --- a/lib/configure +++ b/lib/configure @@ -52,10 +52,8 @@ case $sys in echo >>$c '#define PCI_HAVE_PM_INTEL_CONF' ok=1 ;; - alpha|ia64|sparc|sparc64|ppc|ppc64|x86_64) - echo >>$c '#define PCI_HAVE_64BIT_ADDRESS' - ;; esac + echo >>$c '#define PCI_HAVE_64BIT_ADDRESS' ;; sunos) case $cpu in diff --git a/lib/sysfs.c b/lib/sysfs.c index 2c0a46f..70419ec 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -112,12 +112,6 @@ sysfs_get_resources(struct pci_dev *d) break; if (sscanf(buf, "%llx %llx", &start, &end) != 2) a->error("Syntax error in %s", namebuf); - if (start != (unsigned long long)(pciaddr_t) start || - end != (unsigned long long)(pciaddr_t) end) - { - a->warning("Resource %d in %s has a 64-bit address, ignoring", i, namebuf); - start = end = 0; - } if (start) size = end - start + 1; else diff --git a/lib/types.h b/lib/types.h index 8f519d4..4808f56 100644 --- a/lib/types.h +++ b/lib/types.h @@ -1,7 +1,7 @@ /* * The PCI Library -- Types and Format Strings * - * Copyright (c) 1997--2004 Martin Mares + * Copyright (c) 1997--2005 Martin Mares * * Can be freely distributed and used under the terms of the GNU GPL. */ @@ -35,7 +35,7 @@ typedef unsigned long long u64; #ifdef PCI_HAVE_64BIT_ADDRESS typedef u64 pciaddr_t; -#define PCIADDR_T_FMT "%016" PCI_U64_FMT "x" +#define PCIADDR_T_FMT "%08" PCI_U64_FMT "x" #define PCIADDR_PORT_FMT "%04" PCI_U64_FMT "x" #else typedef u32 pciaddr_t; diff --git a/lspci.c b/lspci.c index 65d4ec8..04bbb3d 100644 --- a/lspci.c +++ b/lspci.c @@ -355,8 +355,9 @@ show_bases(struct device *d, int cnt) z = get_conf_long(d, PCI_BASE_ADDRESS_0 + 4*i); if (buscentric_view) { + u32 y = a & 0xffffffff; if (a || z) - printf("%08x" PCIADDR_T_FMT, z, a); + printf("%08x%08x", z, y); else printf(""); done = 1; -- 2.39.2