summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/pci.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index bd8c290..aba24ca 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1344,12 +1344,15 @@ pci_alloc_resource(device_t dev, device_t child, int type, int *rid,
break;
case SYS_RES_IOPORT:
case SYS_RES_MEMORY:
- /*
- * Enable the I/O mode. We should also be allocating
- * resources too. XXX
- */
- if (PCI_ENABLE_IO(dev, child, type))
- return (NULL);
+ if (*rid < PCIR_MAPS + 4*cfg->nummaps) {
+ /*
+ * Enable the I/O mode. We should
+ * also be allocating resources
+ * too. XXX
+ */
+ if (PCI_ENABLE_IO(dev, child, type))
+ return (NULL);
+ }
break;
}
}
OpenPOWER on IntegriCloud