From owner-svn-src-stable@FreeBSD.ORG Fri Jan 8 21:27:35 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8423410656A4; Fri, 8 Jan 2010 21:27:35 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 732C28FC1D; Fri, 8 Jan 2010 21:27:35 +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 o08LRZPh096012; Fri, 8 Jan 2010 21:27:35 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08LRZxb096010; Fri, 8 Jan 2010 21:27:35 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001082127.o08LRZxb096010@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 8 Jan 2010 21:27:35 +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: r201827 - stable/7/sys/dev/vge X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 21:27:35 -0000 Author: yongari Date: Fri Jan 8 21:27:35 2010 New Revision: 201827 URL: http://svn.freebsd.org/changeset/base/201827 Log: MFC r200519-200522 r200519: Remove register keyword. r200520: Prefer device_printf(9) to printf(9). r200521: Fix spelling in comment. r200522: Prefer bus_alloc_resource_any(9) to bus_alloc_resource(9). Modified: stable/7/sys/dev/vge/if_vge.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/vge/if_vge.c ============================================================================== --- stable/7/sys/dev/vge/if_vge.c Fri Jan 8 21:27:09 2010 (r201826) +++ stable/7/sys/dev/vge/if_vge.c Fri Jan 8 21:27:35 2010 (r201827) @@ -234,7 +234,7 @@ vge_eeprom_getword(sc, addr, dest) int addr; u_int16_t *dest; { - register int i; + int i; u_int16_t word = 0; /* @@ -537,7 +537,7 @@ fail: /* * Program the multicast filter. We use the 64-entry CAM filter * for perfect filtering. If there's more than 64 multicast addresses, - * we use the hash filter insted. + * we use the hash filter instead. */ static void vge_setmulti(sc) @@ -603,7 +603,7 @@ static void vge_reset(sc) struct vge_softc *sc; { - register int i; + int i; CSR_WRITE_1(sc, VGE_CRS1, VGE_CR1_SOFTRESET); @@ -921,10 +921,9 @@ vge_attach(dev) u_char eaddr[ETHER_ADDR_LEN]; struct vge_softc *sc; struct ifnet *ifp; - int unit, error = 0, rid; + int error = 0, rid; sc = device_get_softc(dev); - unit = device_get_unit(dev); sc->vge_dev = dev; mtx_init(&sc->vge_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, @@ -937,22 +936,22 @@ vge_attach(dev) pci_enable_busmaster(dev); rid = VGE_PCI_LOMEM; - sc->vge_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, - 0, ~0, 1, RF_ACTIVE); + sc->vge_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); if (sc->vge_res == NULL) { - printf ("vge%d: couldn't map ports/memory\n", unit); + device_printf(dev, "couldn't map ports/memory\n"); error = ENXIO; goto fail; } /* Allocate interrupt */ rid = 0; - sc->vge_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, - 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE); + sc->vge_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE); if (sc->vge_irq == NULL) { - printf("vge%d: couldn't map interrupt\n", unit); + device_printf(dev, "couldn't map interrupt\n"); error = ENXIO; goto fail; } @@ -1030,7 +1029,7 @@ vge_attach(dev) NULL, vge_intr, sc, &sc->vge_intrhand); if (error) { - printf("vge%d: couldn't set up irq\n", unit); + device_printf(dev, "couldn't set up irq\n"); ether_ifdetach(ifp); goto fail; } @@ -1182,7 +1181,7 @@ vge_newbuf(sc, idx, m) /* * Note: the manual fails to document the fact that for - * proper opration, the driver needs to replentish the RX + * proper operation, the driver needs to replenish the RX * DMA ring 4 descriptors at a time (rather than one at a * time, like most chips). We can allocate the new buffers * but we should not set the OWN bits until we're ready @@ -1972,7 +1971,7 @@ vge_init_locked(struct vge_softc *sc) /* * Configure one-shot timer for microsecond - * resulution and load it for 500 usecs. + * resolution and load it for 500 usecs. */ CSR_SETBIT_1(sc, VGE_DIAGCTL, VGE_DIAGCTL_TIMER0_RES); CSR_WRITE_2(sc, VGE_SSTIMER, 400); @@ -2262,7 +2261,7 @@ static void vge_stop(sc) struct vge_softc *sc; { - register int i; + int i; struct ifnet *ifp; VGE_LOCK_ASSERT(sc);