]> mj.ucw.cz Git - pciutils.git/commitdiff
Fixed 64 bit addresses and released as 2.2.0.
authorMartin Mares <mj@ucw.cz>
Wed, 21 Sep 2005 12:05:23 +0000 (12:05 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 5 May 2006 12:18:32 +0000 (14:18 +0200)
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-84

ChangeLog
Makefile
lib/configure
lib/sysfs.c
lib/types.h
lspci.c

index 430ac5689e1c3135868c686a5dd5900517c263b3..1cef53ec9b94a8473f2f634c2608e89ade4768a7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2005-09-21  Martin Mares  <mj@ucw.cz>
+
+       * 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  <mj@ucw.cz>
 
        * Released as 2.1.99-test11.
index 384d530ce05eca11d7657321f6adcc63b73af956..ae17fb101e703e39c3cd51eabf636c9d1b551e2e 100644 (file)
--- 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
index 73efcc8485344539437606e99717338d43759025..ecd350352d444fac3d1ddcc5b67b41c2cc5b8feb 100755 (executable)
@@ -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
index 2c0a46f7763aa2764660873da73ca040e8f3fe12..70419ecfca2a30b659a6430e6253b8776e155ac4 100644 (file)
@@ -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
index 8f519d4f47bb12c9081acb4e1b6cfdd37d847ea4..4808f564554088c2bbe0eb10d74179d344b702e2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     The PCI Library -- Types and Format Strings
  *
- *     Copyright (c) 1997--2004 Martin Mares <mj@ucw.cz>
+ *     Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
  *
  *     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 65d4ec8d2778b1b9edbf1bcd8b550016dafaafc9..04bbb3d9eecd7d122b27fc0fed4f9b7ad44b236f 100644 (file)
--- 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("<unassigned>");
                      done = 1;