From owner-svn-src-head@FreeBSD.ORG Tue Dec 16 04:59:05 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 1515A1065670; Tue, 16 Dec 2008 04:59:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00D8C8FC1B; Tue, 16 Dec 2008 04:59:05 +0000 (UTC) (envelope-from delphij@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 mBG4x4gO027193; Tue, 16 Dec 2008 04:59:04 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBG4x4Wa027192; Tue, 16 Dec 2008 04:59:04 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200812160459.mBG4x4Wa027192@svn.freebsd.org> From: Xin LI Date: Tue, 16 Dec 2008 04:59:04 +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: r186168 - head/sys/dev/bce 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, 16 Dec 2008 04:59:05 -0000 Author: delphij Date: Tue Dec 16 04:59:04 2008 New Revision: 186168 URL: http://svn.freebsd.org/changeset/base/186168 Log: Test whether sc->tx_mbuf_map[i], not whether sc->tx_mbuf_map is NULL before doing bus_dmamap_sync() since it operates on the former, not the latter. Reviewed by: davidch Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Tue Dec 16 04:41:39 2008 (r186167) +++ head/sys/dev/bce/if_bce.c Tue Dec 16 04:59:04 2008 (r186168) @@ -5114,7 +5114,7 @@ bce_free_tx_chain(struct bce_softc *sc) /* Unmap, unload, and free any mbufs still in the TX mbuf chain. */ for (i = 0; i < TOTAL_TX_BD; i++) { if (sc->tx_mbuf_ptr[i] != NULL) { - if (sc->tx_mbuf_map != NULL) + if (sc->tx_mbuf_map[i] != NULL) bus_dmamap_sync(sc->tx_mbuf_tag, sc->tx_mbuf_map[i], BUS_DMASYNC_POSTWRITE); m_freem(sc->tx_mbuf_ptr[i]);