From owner-svn-src-all@FreeBSD.ORG Mon Jan 10 19:55:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7918F106566B; Mon, 10 Jan 2011 19:55:30 +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 4D8C98FC0C; Mon, 10 Jan 2011 19:55:30 +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 p0AJtURh091570; Mon, 10 Jan 2011 19:55:30 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AJtUdk091568; Mon, 10 Jan 2011 19:55:30 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101101955.p0AJtUdk091568@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 10 Jan 2011 19:55:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217233 - releng/8.2/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2011 19:55:30 -0000 Author: yongari Date: Mon Jan 10 19:55:30 2011 New Revision: 217233 URL: http://svn.freebsd.org/changeset/base/217233 Log: MFC r217226: Apply DMA address space restriction to controllers that have 4GB DMA boundary bug and runs with PCI-X mode. watchdog timeout was observed on BCM5704 which lives behind certain PCI-X bridge(e.g. AMD 8131 PCI-X bridge). It's still not clear whether the root cause came from that PCI-X bridge or not. The watchdog timeout indicates the issue is in TX path. If the bridge reorders TX mailbox write accesses it would generate all kinds of problems but I'm not sure. This should be revisited. Early MFC requested by re@ for inclusion in 8.2-RC2/7.4-RC2. Tested by: Michael L. Squires (mikes <> siralan dot org) Approved by: re (kensmith) Modified: releng/8.2/sys/dev/bge/if_bge.c Directory Properties: releng/8.2/sys/ (props changed) releng/8.2/sys/amd64/include/xen/ (props changed) releng/8.2/sys/cddl/contrib/opensolaris/ (props changed) releng/8.2/sys/contrib/dev/acpica/ (props changed) releng/8.2/sys/contrib/pf/ (props changed) Modified: releng/8.2/sys/dev/bge/if_bge.c ============================================================================== --- releng/8.2/sys/dev/bge/if_bge.c Mon Jan 10 19:49:18 2011 (r217232) +++ releng/8.2/sys/dev/bge/if_bge.c Mon Jan 10 19:55:30 2011 (r217233) @@ -2479,8 +2479,18 @@ bge_dma_alloc(struct bge_softc *sc) /* Create parent tag for buffers. */ boundary = 0; - if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) != 0) + if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) != 0) { boundary = BGE_DMA_BNDRY; + /* + * XXX + * watchdog timeout issue was observed on BCM5704 which + * lives behind PCI-X bridge(e.g AMD 8131 PCI-X bridge). + * Limiting DMA address space to 32bits seems to address + * it. + */ + if (sc->bge_flags & BGE_FLAG_PCIX) + lowaddr = BUS_SPACE_MAXADDR_32BIT; + } error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), 1, boundary, lowaddr, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT,