summaryrefslogtreecommitdiff
path: root/sys/dev/ips/ips_pci.c
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2004-03-17 17:50:55 +0000
committerNate Lawson <njl@FreeBSD.org>2004-03-17 17:50:55 +0000
commit5f96beb9e08be2b08309a6b98967246b64272ade (patch)
treea1c3f00139d832c8e80338cfc56c8b1aaffd88ab /sys/dev/ips/ips_pci.c
parent902aa2e784bda6cef99fb99db6acd4f435a3ff09 (diff)
Notes
Diffstat (limited to 'sys/dev/ips/ips_pci.c')
-rw-r--r--sys/dev/ips/ips_pci.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ips/ips_pci.c b/sys/dev/ips/ips_pci.c
index c4a2db3bc58c8..80681c7e4297d 100644
--- a/sys/dev/ips/ips_pci.c
+++ b/sys/dev/ips/ips_pci.c
@@ -92,13 +92,15 @@ static int ips_pci_attach(device_t dev)
else
sc->rid = PCIR_BAR(1);
sc->iotype = SYS_RES_MEMORY;
- sc->iores = bus_alloc_resource(dev, sc->iotype, &sc->rid, 0, ~0, 1, RF_ACTIVE);
+ sc->iores = bus_alloc_resource_any(dev, sc->iotype,
+ &sc->rid, RF_ACTIVE);
}
if(!sc->iores && command & PCIM_CMD_PORTEN){
PRINTF(10, "trying PORTIO\n");
sc->rid = PCIR_BAR(0);
sc->iotype = SYS_RES_IOPORT;
- sc->iores = bus_alloc_resource(dev, sc->iotype, &sc->rid, 0, ~0, 1, RF_ACTIVE);
+ sc->iores = bus_alloc_resource_any(dev, sc->iotype,
+ &sc->rid, RF_ACTIVE);
}
if(sc->iores == NULL){
device_printf(dev, "resource allocation failed\n");
@@ -108,7 +110,8 @@ static int ips_pci_attach(device_t dev)
sc->bushandle = rman_get_bushandle(sc->iores);
/*allocate an interrupt. when does the irq become active? after leaving attach? */
sc->irqrid = 0;
- if(!(sc->irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqrid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE))){
+ if(!(sc->irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ,
+ &sc->irqrid, RF_SHAREABLE | RF_ACTIVE))){
device_printf(dev, "irq allocation failed\n");
goto error;
}