From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 20:28:43 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5798010656AA; Tue, 14 Oct 2008 20:28:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D2608FC08; Tue, 14 Oct 2008 20:28:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9EKShEu015516; Tue, 14 Oct 2008 20:28:43 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9EKShoL015514; Tue, 14 Oct 2008 20:28:43 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200810142028.m9EKShoL015514@svn.freebsd.org> From: Marius Strobl Date: Tue, 14 Oct 2008 20:28:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183896 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2008 20:28:43 -0000 Author: marius Date: Tue Oct 14 20:28:42 2008 New Revision: 183896 URL: http://svn.freebsd.org/changeset/base/183896 Log: Use bus_{read,write}_4(9) instead of bus_space_{read,write}_4(9) in order to get rid of the bus space handle and tag in the softc. MFC after: 1 month Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Oct 14 20:18:57 2008 (r183895) +++ head/sys/dev/bge/if_bge.c Tue Oct 14 20:28:42 2008 (r183896) @@ -2377,11 +2377,7 @@ bge_attach(device_t dev) goto fail; } - sc->bge_btag = rman_get_bustag(sc->bge_res); - sc->bge_bhandle = rman_get_bushandle(sc->bge_res); - /* Save ASIC rev. */ - sc->bge_chipid = pci_read_config(dev, BGE_PCI_MISC_CTL, 4) & BGE_PCIMISCCTL_ASICREV; Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Tue Oct 14 20:18:57 2008 (r183895) +++ head/sys/dev/bge/if_bgereg.h Tue Oct 14 20:28:42 2008 (r183896) @@ -1896,8 +1896,7 @@ struct bge_rcb { }; #define RCB_WRITE_4(sc, rcb, offset, val) \ - bus_space_write_4(sc->bge_btag, sc->bge_bhandle, \ - rcb + offsetof(struct bge_rcb, offset), val) + bus_write_4(sc->bge_res, rcb + offsetof(struct bge_rcb, offset), val) #define BGE_RCB_MAXLEN_FLAGS(maxlen, flags) ((maxlen) << 16 | (flags)) #define BGE_RCB_FLAG_USE_EXT_RX_BD 0x0001 @@ -2394,10 +2393,10 @@ struct bge_gib { */ #define CSR_WRITE_4(sc, reg, val) \ - bus_space_write_4(sc->bge_btag, sc->bge_bhandle, reg, val) + bus_write_4(sc->bge_res, reg, val) #define CSR_READ_4(sc, reg) \ - bus_space_read_4(sc->bge_btag, sc->bge_bhandle, reg) + bus_read_4(sc->bge_res, reg) #define BGE_SETBIT(sc, reg, x) \ CSR_WRITE_4(sc, reg, (CSR_READ_4(sc, reg) | (x))) @@ -2522,8 +2521,6 @@ struct bge_softc { device_t bge_dev; struct mtx bge_mtx; device_t bge_miibus; - bus_space_handle_t bge_bhandle; - bus_space_tag_t bge_btag; void *bge_intrhand; struct resource *bge_irq; struct resource *bge_res;