From owner-svn-src-head@FreeBSD.ORG Tue Jan 4 19:10:55 2011 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 23B1F106564A; Tue, 4 Jan 2011 19:10:55 +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 133A68FC1B; Tue, 4 Jan 2011 19:10:55 +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 p04JAskw051612; Tue, 4 Jan 2011 19:10:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p04JAsfk051610; Tue, 4 Jan 2011 19:10:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101041910.p04JAsfk051610@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 4 Jan 2011 19:10:54 +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: r216970 - 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, 04 Jan 2011 19:10:55 -0000 Author: yongari Date: Tue Jan 4 19:10:54 2011 New Revision: 216970 URL: http://svn.freebsd.org/changeset/base/216970 Log: Partially revert change made in r212061. r212061 relied on bus_dma(9)'s capability which honors boundary restrictions of DMA tag for dynamic buffers. However it seems this does not work well and it triggered watchodg timeouts on controller that has the hardware bug. It's not clear whether there is still another hardware bug not mentioned in errata. This should be revisited since this change shall make use of bounce buffers which in turn reduces performance a lot on systems that have more than 4GB memory. Reported by: Michael L. Squires (mikes <> siralan dot org) Tested by: Michael L. Squires (mikes <> siralan dot org) MFC after: 3 days Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Jan 4 19:09:05 2011 (r216969) +++ head/sys/dev/bge/if_bge.c Tue Jan 4 19:10:54 2011 (r216970) @@ -2475,8 +2475,15 @@ bge_dma_alloc(struct bge_softc *sc) boundary = 0; if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) != 0) boundary = BGE_DMA_BNDRY; + /* + * XXX + * It seems bus_dma(9) still has issue on dealing with boundary + * restriction for dynamic buffers so disable the boundary + * restriction and limit DMA address space to 32bit. It's not + * clear whether there is another hardware issue here. + */ error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), - 1, boundary, lowaddr, BUS_SPACE_MAXADDR, NULL, + 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &sc->bge_cdata.bge_buffer_tag); if (error != 0) {