summaryrefslogtreecommitdiffstats
path: root/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c')
-rw-r--r--sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c b/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c
index 7284af0..3f83859 100644
--- a/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c
+++ b/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c
@@ -469,9 +469,8 @@ avma1pp2_attach_avma1pp(device_t dev)
ifpi2_scp[unit] = sc;
sc->sc_resources.io_rid[0] = PCIR_BAR(1);
- sc->sc_resources.io_base[0] = bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0, ~0, 1, RF_ACTIVE);
+ sc->sc_resources.io_base[0] = bus_alloc_resource_any(dev,
+ SYS_RES_IOPORT, &sc->sc_resources.io_rid[0], RF_ACTIVE);
if (sc->sc_resources.io_base[0] == NULL) {
printf("ifpi2-%d: couldn't map IO port\n", unit);
@@ -484,8 +483,8 @@ avma1pp2_attach_avma1pp(device_t dev)
/* Allocate interrupt */
sc->sc_resources.irq_rid = 0;
- sc->sc_resources.irq = bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE);
+ sc->sc_resources.irq = bus_alloc_resource_any(dev, SYS_RES_IRQ,
+ &sc->sc_resources.irq_rid, RF_SHAREABLE | RF_ACTIVE);
if (sc->sc_resources.irq == NULL) {
bus_release_resource(dev, SYS_RES_IOPORT, PCIR_BAR(1), sc->sc_resources.io_base[0]);
OpenPOWER on IntegriCloud