Index: head/sys/dev/arcmsr/arcmsr.c =================================================================== --- head/sys/dev/arcmsr/arcmsr.c +++ head/sys/dev/arcmsr/arcmsr.c @@ -4323,7 +4323,7 @@ } /* After setting up the adapter, map our interrupt */ rid = 0; - irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0ul, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE); + irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if(irqres == NULL || #if __FreeBSD_version >= 700025 bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY|INTR_MPSAFE, NULL, arcmsr_intr_handler, acb, &acb->ih)) { Index: head/sys/dev/cy/cy_isa.c =================================================================== --- head/sys/dev/cy/cy_isa.c +++ head/sys/dev/cy/cy_isa.c @@ -80,8 +80,8 @@ return (ENXIO); mem_rid = 0; - mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &mem_rid, - 0ul, ~0ul, 0ul, RF_ACTIVE); + mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &mem_rid, + RF_ACTIVE); if (mem_res == NULL) { device_printf(dev, "ioport resource allocation failed\n"); return (ENXIO); @@ -112,8 +112,8 @@ mem_res = NULL; mem_rid = 0; - mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &mem_rid, - 0ul, ~0ul, 0ul, RF_ACTIVE); + mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &mem_rid, + RF_ACTIVE); if (mem_res == NULL) { device_printf(dev, "memory resource allocation failed\n"); goto fail; @@ -127,7 +127,7 @@ } irq_rid = 0; - irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &irq_rid, 0ul, ~0ul, 0ul, + irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &irq_rid, RF_SHAREABLE | RF_ACTIVE); if (irq_res == NULL) { device_printf(dev, "interrupt resource allocation failed\n"); Index: head/sys/dev/cy/cy_pci.c =================================================================== --- head/sys/dev/cy/cy_pci.c +++ head/sys/dev/cy/cy_pci.c @@ -114,8 +114,8 @@ mem_res = NULL; ioport_rid = CY_PCI_BASE_ADDR1; - ioport_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &ioport_rid, - 0ul, ~0ul, 0ul, RF_ACTIVE); + ioport_res = bus_alloc_resource_(dev, SYS_RES_IOPORT, &ioport_rid, + RF_ACTIVE); if (ioport_res == NULL) { device_printf(dev, "ioport resource allocation failed\n"); goto fail; @@ -123,8 +123,8 @@ ioport = rman_get_start(ioport_res); mem_rid = CY_PCI_BASE_ADDR2; - mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &mem_rid, - 0ul, ~0ul, 0ul, RF_ACTIVE); + mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &mem_rid, + RF_ACTIVE); if (mem_res == NULL) { device_printf(dev, "memory resource allocation failed\n"); goto fail; @@ -138,7 +138,7 @@ } irq_rid = 0; - irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &irq_rid, 0ul, ~0ul, 0ul, + irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &irq_rid, RF_SHAREABLE | RF_ACTIVE); if (irq_res == NULL) { device_printf(dev, "interrupt resource allocation failed\n"); Index: head/sys/dev/ed/if_ed_pccard.c =================================================================== --- head/sys/dev/ed/if_ed_pccard.c +++ head/sys/dev/ed/if_ed_pccard.c @@ -509,8 +509,8 @@ } if (rman_get_size(sc->port_res) == ED_NOVELL_IO_PORTS / 2) { port_rid++; - sc->port_res2 = bus_alloc_resource(dev, SYS_RES_IOPORT, - &port_rid, 0ul, ~0ul, 1, RF_ACTIVE); + sc->port_res2 = bus_alloc_resource_any(dev, SYS_RES_IOPORT, + &port_rid, RF_ACTIVE); if (sc->port_res2 == NULL || rman_get_size(sc->port_res2) != ED_NOVELL_IO_PORTS / 2) { error = ENXIO; Index: head/sys/dev/fb/s3_pci.c =================================================================== --- head/sys/dev/fb/s3_pci.c +++ head/sys/dev/fb/s3_pci.c @@ -478,8 +478,8 @@ /* Allocate resources */ rid = 0; - if (!(sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, - 0ul, ~0ul, 0, RF_ACTIVE | RF_SHAREABLE))) { + if (!(sc->port_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, + RF_ACTIVE | RF_SHAREABLE))) { printf("%s: port resource allocation failed!\n", __func__); goto error; } @@ -487,8 +487,8 @@ sc->sh = rman_get_bushandle(sc->port_res); rid = 1; - if (!(sc->enh_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, - 0ul, ~0ul, 0, RF_ACTIVE | RF_SHAREABLE))) { + if (!(sc->enh_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, + RF_ACTIVE | RF_SHAREABLE))) { printf("%s: enhanced port resource allocation failed!\n", __func__); goto error; Index: head/sys/dev/fdc/fdc_pccard.c =================================================================== --- head/sys/dev/fdc/fdc_pccard.c +++ head/sys/dev/fdc/fdc_pccard.c @@ -56,8 +56,7 @@ int rid, i; rid = 0; - res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0ul, ~0ul, 1, - RF_ACTIVE); + res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); if (res == NULL) { device_printf(dev, "cannot alloc I/O port range\n"); return (ENXIO); Index: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c =================================================================== --- head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c +++ head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c @@ -1260,8 +1260,8 @@ for (hba = vbus_ext->hba_list; hba; hba = hba->next) { int rid = 0; - if ((hba->irq_res = bus_alloc_resource(hba->pcidev, - SYS_RES_IRQ, &rid, 0, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL) + if ((hba->irq_res = bus_alloc_resource_any(hba->pcidev, + SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { os_printk("can't allocate interrupt"); return ; Index: head/sys/dev/hptiop/hptiop.c =================================================================== --- head/sys/dev/hptiop/hptiop.c +++ head/sys/dev/hptiop/hptiop.c @@ -2052,8 +2052,8 @@ xpt_action((union ccb *)&ccb); rid = 0; - if ((hba->irq_res = bus_alloc_resource(hba->pcidev, SYS_RES_IRQ, - &rid, 0, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL) { + if ((hba->irq_res = bus_alloc_resource_any(hba->pcidev, SYS_RES_IRQ, + &rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { device_printf(dev, "allocate irq failed!\n"); goto free_hba_path; } Index: head/sys/dev/hptmv/entry.c =================================================================== --- head/sys/dev/hptmv/entry.c +++ head/sys/dev/hptmv/entry.c @@ -1990,7 +1990,7 @@ return rid; rid = 0; - if ((pAdapter->hpt_irq = bus_alloc_resource(pAdapter->hpt_dev, SYS_RES_IRQ, &rid, 0, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL) + if ((pAdapter->hpt_irq = bus_alloc_resource_any(pAdapter->hpt_dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { hpt_printk(("can't allocate interrupt\n")); return(ENXIO); Index: head/sys/dev/hptnr/hptnr_osm_bsd.c =================================================================== --- head/sys/dev/hptnr/hptnr_osm_bsd.c +++ head/sys/dev/hptnr/hptnr_osm_bsd.c @@ -1445,8 +1445,8 @@ for (hba = vbus_ext->hba_list; hba; hba = hba->next) { int rid = 0; - if ((hba->irq_res = bus_alloc_resource(hba->pcidev, - SYS_RES_IRQ, &rid, 0, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL) + if ((hba->irq_res = bus_alloc_resource_any(hba->pcidev, + SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { os_printk("can't allocate interrupt"); return ; Index: head/sys/dev/hptrr/hptrr_osm_bsd.c =================================================================== --- head/sys/dev/hptrr/hptrr_osm_bsd.c +++ head/sys/dev/hptrr/hptrr_osm_bsd.c @@ -1093,8 +1093,8 @@ for (hba = vbus_ext->hba_list; hba; hba = hba->next) { int rid = 0; - if ((hba->irq_res = bus_alloc_resource(hba->pcidev, - SYS_RES_IRQ, &rid, 0, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL) + if ((hba->irq_res = bus_alloc_resource_any(hba->pcidev, + SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { os_printk("can't allocate interrupt"); return ; Index: head/sys/dev/isci/isci.c =================================================================== --- head/sys/dev/isci/isci.c +++ head/sys/dev/isci/isci.c @@ -138,8 +138,8 @@ struct ISCI_PCI_BAR *pci_bar = &isci->pci_bar[i]; pci_bar->resource_id = PCIR_BAR(i*2); - pci_bar->resource = bus_alloc_resource(isci->device, - SYS_RES_MEMORY, &pci_bar->resource_id, 0, ~0, 1, + pci_bar->resource = bus_alloc_resource_any(isci->device, + SYS_RES_MEMORY, &pci_bar->resource_id, RF_ACTIVE); if(pci_bar->resource == NULL) Index: head/sys/dev/ixgb/if_ixgb.c =================================================================== --- head/sys/dev/ixgb/if_ixgb.c +++ head/sys/dev/ixgb/if_ixgb.c @@ -1243,8 +1243,8 @@ device_t dev = adapter->dev; rid = IXGB_MMBA; - adapter->res_memory = bus_alloc_resource(dev, SYS_RES_MEMORY, - &rid, 0, ~0, 1, + adapter->res_memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &rid, RF_ACTIVE); if (!(adapter->res_memory)) { device_printf(dev, "Unable to allocate bus resource: memory\n"); @@ -1257,9 +1257,9 @@ adapter->hw.hw_addr = (uint8_t *) & adapter->osdep.mem_bus_space_handle; rid = 0x0; - adapter->res_interrupt = bus_alloc_resource(dev, SYS_RES_IRQ, - &rid, 0, ~0, 1, - RF_SHAREABLE | RF_ACTIVE); + adapter->res_interrupt = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &rid, + RF_SHAREABLE | RF_ACTIVE); if (!(adapter->res_interrupt)) { device_printf(dev, "Unable to allocate bus resource: interrupt\n"); Index: head/sys/dev/lmc/if_lmc.c =================================================================== --- head/sys/dev/lmc/if_lmc.c +++ head/sys/dev/lmc/if_lmc.c @@ -4510,8 +4510,8 @@ sc->csr_res_id = TLP_CBMA; sc->csr_res_type = SYS_RES_MEMORY; # endif - sc->csr_res = bus_alloc_resource(dev, sc->csr_res_type, &sc->csr_res_id, - 0, ~0, 1, RF_ACTIVE); + sc->csr_res = bus_alloc_resource_any(dev, sc->csr_res_type, &sc->csr_res_id, + RF_ACTIVE); if (sc->csr_res == NULL) { printf("%s: bus_alloc_resource(csr) failed.\n", NAME_UNIT); @@ -4522,8 +4522,8 @@ /* Allocate PCI interrupt resources for the card. */ sc->irq_res_id = 0; - sc->irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irq_res_id, - 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE); + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_res_id, + RF_ACTIVE | RF_SHAREABLE); if (sc->irq_res == NULL) { printf("%s: bus_alloc_resource(irq) failed.\n", NAME_UNIT); Index: head/sys/dev/mrsas/mrsas.c =================================================================== --- head/sys/dev/mrsas/mrsas.c +++ head/sys/dev/mrsas/mrsas.c @@ -833,8 +833,8 @@ bar = pci_read_config(dev, MRSAS_PCI_BAR1, 4); sc->reg_res_id = MRSAS_PCI_BAR1;/* BAR1 offset */ - if ((sc->reg_res = bus_alloc_resource(dev, SYS_RES_MEMORY, - &(sc->reg_res_id), 0, ~0, 1, RF_ACTIVE)) + if ((sc->reg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &(sc->reg_res_id), RF_ACTIVE)) == NULL) { device_printf(dev, "Cannot allocate PCI registers\n"); goto attach_fail; Index: head/sys/dev/mxge/if_mxge.c =================================================================== --- head/sys/dev/mxge/if_mxge.c +++ head/sys/dev/mxge/if_mxge.c @@ -4661,8 +4661,8 @@ rid = 0; sc->legacy_irq = 1; } - sc->irq_res = bus_alloc_resource(sc->dev, SYS_RES_IRQ, &rid, 0, ~0, - 1, RF_SHAREABLE | RF_ACTIVE); + sc->irq_res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE); if (sc->irq_res == NULL) { device_printf(sc->dev, "could not alloc interrupt\n"); return ENXIO; @@ -4813,8 +4813,8 @@ /* Map the board into the kernel */ rid = PCIR_BARS; - sc->mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, - ~0, 1, RF_ACTIVE); + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); if (sc->mem_res == NULL) { device_printf(dev, "could not map memory\n"); err = ENXIO; Index: head/sys/dev/nvme/nvme_ctrlr.c =================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c +++ head/sys/dev/nvme/nvme_ctrlr.c @@ -52,8 +52,8 @@ ctrlr->resource_id = PCIR_BAR(0); - ctrlr->resource = bus_alloc_resource(ctrlr->dev, SYS_RES_MEMORY, - &ctrlr->resource_id, 0, ~0, 1, RF_ACTIVE); + ctrlr->resource = bus_alloc_resource_any(ctrlr->dev, SYS_RES_MEMORY, + &ctrlr->resource_id, RF_ACTIVE); if(ctrlr->resource == NULL) { nvme_printf(ctrlr, "unable to allocate pci resource\n"); @@ -72,8 +72,8 @@ * bus_alloc_resource() will just return NULL which is OK. */ ctrlr->bar4_resource_id = PCIR_BAR(4); - ctrlr->bar4_resource = bus_alloc_resource(ctrlr->dev, SYS_RES_MEMORY, - &ctrlr->bar4_resource_id, 0, ~0, 1, RF_ACTIVE); + ctrlr->bar4_resource = bus_alloc_resource_any(ctrlr->dev, SYS_RES_MEMORY, + &ctrlr->bar4_resource_id, RF_ACTIVE); return (0); } Index: head/sys/dev/quicc/quicc_core.c =================================================================== --- head/sys/dev/quicc/quicc_core.c +++ head/sys/dev/quicc/quicc_core.c @@ -110,8 +110,8 @@ * Re-allocate. We expect that the softc contains the information * collected by quicc_bfe_probe() intact. */ - sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, &sc->sc_rrid, - 0, ~0, 0, RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_any(dev, sc->sc_rtype, &sc->sc_rrid, + RF_ACTIVE); if (sc->sc_rres == NULL) return (ENXIO); @@ -228,13 +228,13 @@ sc->sc_rrid = 0; sc->sc_rtype = SYS_RES_MEMORY; - sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, &sc->sc_rrid, - 0, ~0, 0, RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_any(dev, sc->sc_rtype, &sc->sc_rrid, + RF_ACTIVE); if (sc->sc_rres == NULL) { sc->sc_rrid = 0; sc->sc_rtype = SYS_RES_IOPORT; - sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, - &sc->sc_rrid, 0, ~0, 0, RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_any(dev, sc->sc_rtype, + &sc->sc_rrid, RF_ACTIVE); if (sc->sc_rres == NULL) return (ENXIO); } Index: head/sys/dev/sound/pci/envy24.c =================================================================== --- head/sys/dev/sound/pci/envy24.c +++ head/sys/dev/sound/pci/envy24.c @@ -2482,17 +2482,17 @@ { /* allocate I/O port resource */ sc->csid = PCIR_CCS; - sc->cs = bus_alloc_resource(sc->dev, SYS_RES_IOPORT, - &sc->csid, 0, ~0, 1, RF_ACTIVE); + sc->cs = bus_alloc_resource_any(sc->dev, SYS_RES_IOPORT, + &sc->csid, RF_ACTIVE); sc->ddmaid = PCIR_DDMA; - sc->ddma = bus_alloc_resource(sc->dev, SYS_RES_IOPORT, - &sc->ddmaid, 0, ~0, 1, RF_ACTIVE); + sc->ddma = bus_alloc_resource_any(sc->dev, SYS_RES_IOPORT, + &sc->ddmaid, RF_ACTIVE); sc->dsid = PCIR_DS; - sc->ds = bus_alloc_resource(sc->dev, SYS_RES_IOPORT, - &sc->dsid, 0, ~0, 1, RF_ACTIVE); + sc->ds = bus_alloc_resource_any(sc->dev, SYS_RES_IOPORT, + &sc->dsid, RF_ACTIVE); sc->mtid = PCIR_MT; - sc->mt = bus_alloc_resource(sc->dev, SYS_RES_IOPORT, - &sc->mtid, 0, ~0, 1, RF_ACTIVE); + sc->mt = bus_alloc_resource_any(sc->dev, SYS_RES_IOPORT, + &sc->mtid, RF_ACTIVE); if (!sc->cs || !sc->ddma || !sc->ds || !sc->mt) { device_printf(sc->dev, "unable to map IO port space\n"); return ENXIO; @@ -2516,8 +2516,8 @@ /* allocate interrupt resource */ sc->irqid = 0; - sc->irq = bus_alloc_resource(sc->dev, SYS_RES_IRQ, &sc->irqid, - 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE); + sc->irq = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &sc->irqid, + RF_ACTIVE | RF_SHAREABLE); if (!sc->irq || snd_setup_intr(sc->dev, sc->irq, INTR_MPSAFE, envy24_intr, sc, &sc->ih)) { device_printf(sc->dev, "unable to map interrupt\n"); Index: head/sys/dev/sound/pci/envy24ht.c =================================================================== --- head/sys/dev/sound/pci/envy24ht.c +++ head/sys/dev/sound/pci/envy24ht.c @@ -2400,11 +2400,11 @@ { /* allocate I/O port resource */ sc->csid = PCIR_CCS; - sc->cs = bus_alloc_resource(sc->dev, SYS_RES_IOPORT, - &sc->csid, 0, ~0, 1, RF_ACTIVE); + sc->cs = bus_alloc_resource_any(sc->dev, SYS_RES_IOPORT, + &sc->csid, RF_ACTIVE); sc->mtid = ENVY24HT_PCIR_MT; - sc->mt = bus_alloc_resource(sc->dev, SYS_RES_IOPORT, - &sc->mtid, 0, ~0, 1, RF_ACTIVE); + sc->mt = bus_alloc_resource_any(sc->dev, SYS_RES_IOPORT, + &sc->mtid, RF_ACTIVE); if (!sc->cs || !sc->mt) { device_printf(sc->dev, "unable to map IO port space\n"); return ENXIO; @@ -2422,8 +2422,8 @@ /* allocate interrupt resource */ sc->irqid = 0; - sc->irq = bus_alloc_resource(sc->dev, SYS_RES_IRQ, &sc->irqid, - 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE); + sc->irq = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &sc->irqid, + RF_ACTIVE | RF_SHAREABLE); if (!sc->irq || snd_setup_intr(sc->dev, sc->irq, INTR_MPSAFE, envy24ht_intr, sc, &sc->ih)) { device_printf(sc->dev, "unable to map interrupt\n"); Index: head/sys/dev/sound/pci/hdspe.c =================================================================== --- head/sys/dev/sound/pci/hdspe.c +++ head/sys/dev/sound/pci/hdspe.c @@ -128,8 +128,8 @@ /* Allocate resource. */ sc->csid = PCIR_BAR(0); - sc->cs = bus_alloc_resource(sc->dev, SYS_RES_MEMORY, - &sc->csid, 0, ~0, 1, RF_ACTIVE); + sc->cs = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY, + &sc->csid, RF_ACTIVE); if (!sc->cs) { device_printf(sc->dev, "Unable to map SYS_RES_MEMORY.\n"); @@ -141,8 +141,8 @@ /* Allocate interrupt resource. */ sc->irqid = 0; - sc->irq = bus_alloc_resource(sc->dev, SYS_RES_IRQ, &sc->irqid, - 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE); + sc->irq = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &sc->irqid, + RF_ACTIVE | RF_SHAREABLE); if (!sc->irq || bus_setup_intr(sc->dev, sc->irq, INTR_MPSAFE | INTR_TYPE_AV, Index: head/sys/dev/sound/pci/vibes.c =================================================================== --- head/sys/dev/sound/pci/vibes.c +++ head/sys/dev/sound/pci/vibes.c @@ -759,8 +759,8 @@ /* Register IRQ handler */ sc->irqid = 0; - sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid, - 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE); + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqid, + RF_ACTIVE | RF_SHAREABLE); if (!sc->irq || snd_setup_intr(dev, sc->irq, 0, sv_intr, sc, &sc->ih)) { device_printf(dev, "sv_attach: Unable to map interrupt\n"); Index: head/sys/dev/twa/tw_osl_freebsd.c =================================================================== --- head/sys/dev/twa/tw_osl_freebsd.c +++ head/sys/dev/twa/tw_osl_freebsd.c @@ -338,8 +338,8 @@ return(error); } sc->reg_res_id = PCIR_BARS + bar0_offset; - if ((sc->reg_res = bus_alloc_resource(dev, SYS_RES_MEMORY, - &(sc->reg_res_id), 0, ~0, 1, RF_ACTIVE)) + if ((sc->reg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &(sc->reg_res_id), RF_ACTIVE)) == NULL) { tw_osli_printf(sc, "error = %d", TW_CL_SEVERITY_ERROR_STRING, @@ -355,8 +355,8 @@ /* Allocate and register our interrupt. */ sc->irq_res_id = 0; - if ((sc->irq_res = bus_alloc_resource(sc->bus_dev, SYS_RES_IRQ, - &(sc->irq_res_id), 0, ~0, 1, + if ((sc->irq_res = bus_alloc_resource_any(sc->bus_dev, SYS_RES_IRQ, + &(sc->irq_res_id), RF_SHAREABLE | RF_ACTIVE)) == NULL) { tw_osli_printf(sc, "error = %d", TW_CL_SEVERITY_ERROR_STRING, Index: head/sys/dev/tws/tws.c =================================================================== --- head/sys/dev/tws/tws.c +++ head/sys/dev/tws/tws.c @@ -245,8 +245,8 @@ /* allocate MMIO register space */ sc->reg_res_id = TWS_PCI_BAR1; /* BAR1 offset */ - if ((sc->reg_res = bus_alloc_resource(dev, SYS_RES_MEMORY, - &(sc->reg_res_id), 0, ~0, 1, RF_ACTIVE)) + if ((sc->reg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &(sc->reg_res_id), RF_ACTIVE)) == NULL) { tws_log(sc, ALLOC_MEMORY_RES); goto attach_fail_1; Index: head/sys/isa/isa_common.c =================================================================== --- head/sys/isa/isa_common.c +++ head/sys/isa/isa_common.c @@ -150,8 +150,8 @@ start += MAX(align, 1)) { bus_set_resource(child, SYS_RES_MEMORY, i, start, size); - res[i] = bus_alloc_resource(child, - SYS_RES_MEMORY, &i, 0, ~0, 1, + res[i] = bus_alloc_resource_any(child, + SYS_RES_MEMORY, &i, rman_make_alignment_flags(align) /* !RF_ACTIVE */); if (res[i]) { result->ic_mem[i].ir_start = start; @@ -224,8 +224,8 @@ start += align) { bus_set_resource(child, SYS_RES_IOPORT, i, start, size); - res[i] = bus_alloc_resource(child, - SYS_RES_IOPORT, &i, 0, ~0, 1, + res[i] = bus_alloc_resource_any(child, + SYS_RES_IOPORT, &i, rman_make_alignment_flags(align) /* !RF_ACTIVE */); if (res[i]) { result->ic_port[i].ir_start = start; Index: head/sys/isa/vga_isa.c =================================================================== --- head/sys/isa/vga_isa.c +++ head/sys/isa/vga_isa.c @@ -195,11 +195,11 @@ sc = device_get_softc(dev); rid = 0; - bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, - 0, ~0, 0, RF_ACTIVE | RF_SHAREABLE); + bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, + RF_ACTIVE | RF_SHAREABLE); rid = 0; - bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, - 0, ~0, 0, RF_ACTIVE | RF_SHAREABLE); + bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE | RF_SHAREABLE); error = vga_attach_unit(unit, sc, device_get_flags(dev)); if (error) Index: head/sys/mips/sibyte/ata_zbbus.c =================================================================== --- head/sys/mips/sibyte/ata_zbbus.c +++ head/sys/mips/sibyte/ata_zbbus.c @@ -67,7 +67,7 @@ ch->attached = 1; rid = 0; - io = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, 1, RF_ACTIVE); + io = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (io == NULL) return (ENXIO);