From owner-freebsd-current@FreeBSD.ORG Wed Dec 10 20:45:31 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B51B106564A for ; Wed, 10 Dec 2008 20:45:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A0AF68FC08 for ; Wed, 10 Dec 2008 20:45:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mBAKjHkW025674; Wed, 10 Dec 2008 15:45:24 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 10 Dec 2008 15:39:25 -0500 User-Agent: KMail/1.9.7 References: <20081210125627.25732615CD@mail.asahi-net.or.jp> In-Reply-To: <20081210125627.25732615CD@mail.asahi-net.or.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812101539.26031.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Wed, 10 Dec 2008 15:45:24 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8744/Wed Dec 10 13:09:46 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: WATANABE Kazuhiro Subject: Re: [patch] de(4) has not worked on 8-current since Feb 13 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 20:45:31 -0000 On Wednesday 10 December 2008 07:56:25 am WATANABE Kazuhiro wrote: > Hi, all. > > My de(4) NICs has not worked on 8-current since Feb 13. Try this patch to de(4) instead. It removes the alignment requirement for TX buffers since the 4-byte alignment is only required for RX. Index: if_de.c =================================================================== --- if_de.c (revision 185867) +++ if_de.c (working copy) @@ -4491,7 +4491,8 @@ /* Allocate memory for a single descriptor ring. */ static int tulip_busdma_allocring(device_t dev, tulip_softc_t * const sc, size_t count, - bus_size_t maxsize, int nsegs, tulip_ringinfo_t *ri, const char *name) + bus_size_t alignment, bus_size_t maxsize, int nsegs, tulip_ringinfo_t *ri, + const char *name) { size_t size; int error, i; @@ -4527,7 +4528,7 @@ } /* Allocate a tag for the data buffers. */ - error = bus_dma_tag_create(NULL, 4, 0, + error = bus_dma_tag_create(NULL, alignment, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, maxsize, nsegs, TULIP_DATA_PER_DESC, 0, NULL, NULL, &ri->ri_data_tag); if (error) { @@ -4586,8 +4587,8 @@ /* * Allocate space and dmamap for transmit ring. */ - error = tulip_busdma_allocring(dev, sc, TULIP_TXDESCS, TULIP_DATA_PER_DESC, - TULIP_MAX_TXSEG, &sc->tulip_txinfo, "transmit"); + error = tulip_busdma_allocring(dev, sc, 1, TULIP_TXDESCS, + TULIP_DATA_PER_DESC, TULIP_MAX_TXSEG, &sc->tulip_txinfo, "transmit"); if (error) return (error); @@ -4598,7 +4599,7 @@ * a waste in practice though as an ethernet frame can easily fit * in TULIP_RX_BUFLEN bytes. */ - error = tulip_busdma_allocring(dev, sc, TULIP_RXDESCS, MCLBYTES, 1, + error = tulip_busdma_allocring(dev, sc, 4, TULIP_RXDESCS, MCLBYTES, 1, &sc->tulip_rxinfo, "receive"); if (error) return (error); -- John Baldwin