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.
This commit is contained in:
Doug Rabson 2003-09-01 15:01:49 +00:00
parent 21c5ddf529
commit d37a68d05a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119656

View File

@ -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;
}
}