diff options
author | dfr <dfr@FreeBSD.org> | 2003-09-01 15:01:49 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2003-09-01 15:01:49 +0000 |
commit | fb96d0aa201dc9f1a20a32b9007e5ec117f1926c (patch) | |
tree | f9bd81d0e80bc6916a05b198a393209be069d8d2 /sys/dev/pci/pci.c | |
parent | cb09824b9c2ee78086224d5528a13ae99255b507 (diff) | |
download | FreeBSD-src-fb96d0aa201dc9f1a20a32b9007e5ec117f1926c.zip FreeBSD-src-fb96d0aa201dc9f1a20a32b9007e5ec117f1926c.tar.gz |
Don't try to enable io or memory access for non-standard resource
addresses. This stops resource allocations for e.g. amdpm failing - this
has its own special ways of enabling access.
Diffstat (limited to 'sys/dev/pci/pci.c')
-rw-r--r-- | sys/dev/pci/pci.c | 15 |
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; } } |