Date: Wed, 26 Jan 2011 20:36:04 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r217908 - in stable/8/sys/dev: if_ndis mpt Message-ID: <201101262036.p0QKa4vh089393@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Wed Jan 26 20:36:04 2011 New Revision: 217908 URL: http://svn.freebsd.org/changeset/base/217908 Log: MFC 216486,216764: Use bus_alloc_resource_any() instead of bus_alloc_resource(). Modified: stable/8/sys/dev/if_ndis/if_ndis_pccard.c stable/8/sys/dev/if_ndis/if_ndis_pci.c stable/8/sys/dev/mpt/mpt_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/if_ndis/if_ndis_pccard.c ============================================================================== --- stable/8/sys/dev/if_ndis/if_ndis_pccard.c Wed Jan 26 20:34:16 2011 (r217907) +++ stable/8/sys/dev/if_ndis/if_ndis_pccard.c Wed Jan 26 20:36:04 2011 (r217908) @@ -198,9 +198,8 @@ ndis_attach_pccard(dev) resource_list_init(&sc->ndis_rl); sc->ndis_io_rid = 0; - sc->ndis_res_io = bus_alloc_resource(dev, - SYS_RES_IOPORT, &sc->ndis_io_rid, - 0, ~0, 1, RF_ACTIVE); + sc->ndis_res_io = bus_alloc_resource_any(dev, SYS_RES_IOPORT, + &sc->ndis_io_rid, RF_ACTIVE); if (sc->ndis_res_io == NULL) { device_printf(dev, "couldn't map iospace\n"); @@ -213,8 +212,7 @@ ndis_attach_pccard(dev) rman_get_size(sc->ndis_res_io)); rid = 0; - sc->ndis_irq = bus_alloc_resource(dev, - SYS_RES_IRQ, &rid, 0, ~0, 1, + sc->ndis_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (sc->ndis_irq == NULL) { device_printf(dev, Modified: stable/8/sys/dev/if_ndis/if_ndis_pci.c ============================================================================== --- stable/8/sys/dev/if_ndis/if_ndis_pci.c Wed Jan 26 20:34:16 2011 (r217907) +++ stable/8/sys/dev/if_ndis/if_ndis_pci.c Wed Jan 26 20:36:04 2011 (r217908) @@ -192,9 +192,9 @@ ndis_attach_pci(dev) switch (rle->type) { case SYS_RES_IOPORT: sc->ndis_io_rid = rle->rid; - sc->ndis_res_io = bus_alloc_resource(dev, + sc->ndis_res_io = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &sc->ndis_io_rid, - 0, ~0, 1, RF_ACTIVE); + RF_ACTIVE); if (sc->ndis_res_io == NULL) { device_printf(dev, "couldn't map iospace\n"); @@ -214,10 +214,10 @@ ndis_attach_pci(dev) if (sc->ndis_res_mem) { sc->ndis_altmem_rid = rle->rid; sc->ndis_res_altmem = - bus_alloc_resource(dev, + bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->ndis_altmem_rid, - 0, ~0, 1, RF_ACTIVE); + RF_ACTIVE); if (sc->ndis_res_altmem == NULL) { device_printf(dev, "couldn't map alt " @@ -228,10 +228,10 @@ ndis_attach_pci(dev) } else { sc->ndis_mem_rid = rle->rid; sc->ndis_res_mem = - bus_alloc_resource(dev, + bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->ndis_mem_rid, - 0, ~0, 1, RF_ACTIVE); + RF_ACTIVE); if (sc->ndis_res_mem == NULL) { device_printf(dev, "couldn't map memory\n"); @@ -243,9 +243,9 @@ ndis_attach_pci(dev) break; case SYS_RES_IRQ: rid = rle->rid; - sc->ndis_irq = bus_alloc_resource(dev, - SYS_RES_IRQ, &rid, 0, ~0, 1, - RF_SHAREABLE | RF_ACTIVE); + sc->ndis_irq = bus_alloc_resource_any(dev, + SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE); if (sc->ndis_irq == NULL) { device_printf(dev, "couldn't map interrupt\n"); @@ -270,8 +270,8 @@ ndis_attach_pci(dev) */ if (sc->ndis_irq == NULL) { rid = 0; - sc->ndis_irq = bus_alloc_resource(dev, SYS_RES_IRQ, - &rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE); + sc->ndis_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &rid, RF_SHAREABLE | RF_ACTIVE); if (sc->ndis_irq == NULL) { device_printf(dev, "couldn't route interrupt\n"); error = ENXIO; Modified: stable/8/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_pci.c Wed Jan 26 20:34:16 2011 (r217907) +++ stable/8/sys/dev/mpt/mpt_pci.c Wed Jan 26 20:36:04 2011 (r217908) @@ -510,8 +510,8 @@ mpt_pci_attach(device_t dev) * some cards otherwise). */ mpt->pci_pio_rid = PCIR_BAR(MPT_IO_BAR); - mpt->pci_pio_reg = bus_alloc_resource(dev, SYS_RES_IOPORT, - &mpt->pci_pio_rid, 0, ~0, 0, RF_ACTIVE); + mpt->pci_pio_reg = bus_alloc_resource_any(dev, SYS_RES_IOPORT, + &mpt->pci_pio_rid, RF_ACTIVE); if (mpt->pci_pio_reg == NULL) { device_printf(dev, "unable to map registers in PIO mode\n"); goto bad; @@ -521,8 +521,8 @@ mpt_pci_attach(device_t dev) /* Allocate kernel virtual memory for the 9x9's Mem0 region */ mpt->pci_mem_rid = PCIR_BAR(MPT_MEM_BAR); - mpt->pci_reg = bus_alloc_resource(dev, SYS_RES_MEMORY, - &mpt->pci_mem_rid, 0, ~0, 0, RF_ACTIVE); + mpt->pci_reg = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &mpt->pci_mem_rid, RF_ACTIVE); if (mpt->pci_reg == NULL) { device_printf(dev, "Unable to memory map registers.\n"); if (mpt->is_sas) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101262036.p0QKa4vh089393>