summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-10-10 15:20:51 -0700
committerEric Anholt <eric@anholt.net>2007-10-10 15:20:51 -0700
commit57a942b3cca314a56735e0a4198cac2f25b653dd (patch)
tree7aefa42228af047fa1f7ea2522f87d90bcc42b12
parent127ae628a2090bb00df81adce831b8b031d3b4a8 (diff)
FreeBSD: for 64-bit BARs, skip the resource slot used for the upper 32 bits.
This gets us the same resource numbering as on Linux.
-rw-r--r--src/freebsd_pci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c
index bf41f63..0c7cf61 100644
--- a/src/freebsd_pci.c
+++ b/src/freebsd_pci.c
@@ -397,9 +397,10 @@ pci_device_freebsd_probe( struct pci_device * dev )
bar = 0x10;
for (i = 0; i < pci_device_freebsd_get_num_regions( dev ); i++) {
pci_device_freebsd_get_region_info( dev, i, bar );
- if (dev->regions[i].is_64)
+ if (dev->regions[i].is_64) {
bar += 0x08;
- else
+ i++;
+ } else
bar += 0x04;
}