aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>2003-09-01 15:01:49 +0000
committerDoug Rabson <dfr@FreeBSD.org>2003-09-01 15:01:49 +0000
commitd37a68d05a0897b87fa28216356dea945219ae4c (patch)
treef9bd81d0e80bc6916a05b198a393209be069d8d2 /sys/dev
parent21c5ddf529898edc64b8c70d073ed50576f7e3e9 (diff)
Notes
Diffstat (limited to 'sys/dev')
-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 bd8c290db84b..aba24cababd1 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;
}
}