From owner-svn-src-stable@FreeBSD.ORG Tue Jan 3 19:22:29 2012 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 9CA9D106566B; Tue, 3 Jan 2012 19:22:29 +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 707F98FC12; Tue, 3 Jan 2012 19:22:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q03JMT0C038561; Tue, 3 Jan 2012 19:22:29 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q03JMT87038558; Tue, 3 Jan 2012 19:22:29 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201201031922.q03JMT87038558@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 3 Jan 2012 19:22:29 +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: r229409 - stable/7/sys/dev/ti 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: Tue, 03 Jan 2012 19:22:29 -0000 Author: yongari Date: Tue Jan 3 19:22:28 2012 New Revision: 229409 URL: http://svn.freebsd.org/changeset/base/229409 Log: MFC r219547: - Allocate the DMA memory shared between the host and the controller as coherent. - Constify the ti_devs table. - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that. Modified: stable/7/sys/dev/ti/if_ti.c stable/7/sys/dev/ti/if_tireg.h 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/ti/if_ti.c ============================================================================== --- stable/7/sys/dev/ti/if_ti.c Tue Jan 3 19:10:37 2012 (r229408) +++ stable/7/sys/dev/ti/if_ti.c Tue Jan 3 19:22:28 2012 (r229409) @@ -144,7 +144,7 @@ typedef enum { * Various supported device vendors/types and their names. */ -static struct ti_type ti_devs[] = { +static const struct ti_type const ti_devs[] = { { ALT_VENDORID, ALT_DEVICEID_ACENIC, "Alteon AceNIC 1000baseSX Gigabit Ethernet" }, { ALT_VENDORID, ALT_DEVICEID_ACENIC_COPPER, @@ -1083,7 +1083,8 @@ ti_alloc_jumbo_mem(struct ti_softc *sc) if (bus_dmamem_alloc(sc->ti_jumbo_dmat, (void**)&sc->ti_cdata.ti_jumbo_buf, - BUS_DMA_NOWAIT, &sc->ti_jumbo_dmamap) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, + &sc->ti_jumbo_dmamap) != 0) { device_printf(sc->ti_dev, "Failed to allocate jumbo memory\n"); return (ENOBUFS); } @@ -2194,7 +2195,7 @@ ti_rdata_cb(void *arg, bus_dma_segment_t static int ti_probe(device_t dev) { - struct ti_type *t; + const struct ti_type *t; t = ti_devs; @@ -2330,7 +2331,8 @@ ti_attach(device_t dev) } if (bus_dmamem_alloc(sc->ti_rdata_dmat, (void**)&sc->ti_rdata, - BUS_DMA_NOWAIT, &sc->ti_rdata_dmamap) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, + &sc->ti_rdata_dmamap) != 0) { device_printf(dev, "Failed to allocate rdata memory\n"); error = ENOMEM; goto fail; @@ -2428,7 +2430,6 @@ ti_attach(device_t dev) ifp->if_start = ti_start; ifp->if_init = ti_init; ifp->if_baudrate = 1000000000; - ifp->if_mtu = ETHERMTU; ifp->if_snd.ifq_maxlen = TI_TX_RING_CNT - 1; /* Set up ifmedia support. */ Modified: stable/7/sys/dev/ti/if_tireg.h ============================================================================== --- stable/7/sys/dev/ti/if_tireg.h Tue Jan 3 19:10:37 2012 (r229408) +++ stable/7/sys/dev/ti/if_tireg.h Tue Jan 3 19:22:28 2012 (r229409) @@ -967,7 +967,7 @@ struct ti_chain_data { struct ti_type { uint16_t ti_vid; uint16_t ti_did; - char *ti_name; + const char *ti_name; }; #define TI_HWREV_TIGON 0x01