summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index c4a1147..5af67a3 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1344,7 +1344,7 @@ pci_alloc_resource(device_t dev, device_t child, int type, int *rid,
break;
case SYS_RES_IOPORT:
case SYS_RES_MEMORY:
- if (*rid < PCIR_MAPS + 4*cfg->nummaps) {
+ if (*rid < PCIR_BAR(cfg->nummaps)) {
/*
* Enable the I/O mode. We should
* also be allocating resources
OpenPOWER on IntegriCloud