From 187bf2f5bdd1eae3a81f697525511f34fab5536c Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 12 Jul 2009 22:48:14 +0200 Subject: [PATCH] lspci: Let the SR-IOV code dump 64-bit addresses even with 32-bit pciaddr_t. --- ls-ecaps.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ls-ecaps.c b/ls-ecaps.c index b72a746..0d14b7f 100644 --- a/ls-ecaps.c +++ b/ls-ecaps.c @@ -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-"); } -- 2.39.5