From owner-svn-src-stable-7@FreeBSD.ORG Wed Jan 26 20:36:21 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EAF71065672; Wed, 26 Jan 2011 20:36:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CFDC8FC13; Wed, 26 Jan 2011 20:36:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0QKaKDB089439; Wed, 26 Jan 2011 20:36:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0QKaKf1089435; Wed, 26 Jan 2011 20:36:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201101262036.p0QKaKf1089435@svn.freebsd.org> From: John Baldwin Date: Wed, 26 Jan 2011 20:36:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217909 - in stable/7/sys/dev: if_ndis mpt X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2011 20:36:21 -0000 Author: jhb Date: Wed Jan 26 20:36:20 2011 New Revision: 217909 URL: http://svn.freebsd.org/changeset/base/217909 Log: MFC 216486,216764: Use bus_alloc_resource_any() instead of bus_alloc_resource(). Modified: stable/7/sys/dev/if_ndis/if_ndis_pccard.c stable/7/sys/dev/if_ndis/if_ndis_pci.c stable/7/sys/dev/mpt/mpt_pci.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/if_ndis/if_ndis_pccard.c ============================================================================== --- stable/7/sys/dev/if_ndis/if_ndis_pccard.c Wed Jan 26 20:36:04 2011 (r217908) +++ stable/7/sys/dev/if_ndis/if_ndis_pccard.c Wed Jan 26 20:36:20 2011 (r217909) @@ -195,9 +195,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"); @@ -210,8 +209,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/7/sys/dev/if_ndis/if_ndis_pci.c ============================================================================== --- stable/7/sys/dev/if_ndis/if_ndis_pci.c Wed Jan 26 20:36:04 2011 (r217908) +++ stable/7/sys/dev/if_ndis/if_ndis_pci.c Wed Jan 26 20:36:20 2011 (r217909) @@ -195,9 +195,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"); @@ -217,10 +217,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 " @@ -231,10 +231,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"); @@ -246,9 +246,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"); @@ -273,8 +273,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/7/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/7/sys/dev/mpt/mpt_pci.c Wed Jan 26 20:36:04 2011 (r217908) +++ stable/7/sys/dev/mpt/mpt_pci.c Wed Jan 26 20:36:20 2011 (r217909) @@ -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) {