]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
lspci: Let the SR-IOV code dump 64-bit addresses even with 32-bit pciaddr_t.
authorMartin Mares <mj@ucw.cz>
Sun, 12 Jul 2009 20:48:14 +0000 (22:48 +0200)
committerMartin Mares <mj@ucw.cz>
Sun, 12 Jul 2009 20:48:14 +0000 (22:48 +0200)
ls-ecaps.c

index b72a746d367f01fce921e910d5bd1b647f937598..0d14b7f1c37d9671bbfabcfd5fac9e8e945234c8 100644 (file)
@@ -185,7 +185,7 @@ cap_sriov(struct device *d, int where)
 
   for (i=0; i < PCI_IOV_NUM_BAR; i++)
     {
-      pciaddr_t addr;
+      u32 addr;
       int type;
       u32 h;
       l = get_conf_long(d, where + PCI_IOV_BAR_BASE + 4*i);
@@ -200,10 +200,10 @@ cap_sriov(struct device *d, int where)
        {
          i++;
          h = get_conf_long(d, where + PCI_IOV_BAR_BASE + (i*4));
-         addr |= (pciaddr_t)h<<32;
+         printf("%08x", h);
        }
-      printf(PCIADDR_T_FMT, addr);
-      printf(" (%s-bit, %sprefetchable)\n",
+      printf("%08x (%s-bit, %sprefetchable)\n",
+       addr,
        (type == PCI_BASE_ADDRESS_MEM_TYPE_32) ? "32" : "64",
        (l & PCI_BASE_ADDRESS_MEM_PREFETCH) ? "" : "non-");
     }