From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 20:11:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 848B4D31; Mon, 1 Apr 2013 20:11:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 771D6DED; Mon, 1 Apr 2013 20:11:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31KBKJk095914; Mon, 1 Apr 2013 20:11:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31KBKxX095913; Mon, 1 Apr 2013 20:11:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304012011.r31KBKxX095913@svn.freebsd.org> From: Adrian Chadd Date: Mon, 1 Apr 2013 20:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248984 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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, 01 Apr 2013 20:11:20 -0000 Author: adrian Date: Mon Apr 1 20:11:19 2013 New Revision: 248984 URL: http://svnweb.freebsd.org/changeset/base/248984 Log: Only unmap the RX mbuf DMA map if there's a buffer here. The normal RX path (ath_rx_pkt()) will sync and unmap the buffer before passing it up the stack. We only need to do this if we're flushing the FIFO during reset/shutdown. Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Mon Apr 1 19:13:46 2013 (r248983) +++ head/sys/dev/ath/if_ath_rx_edma.c Mon Apr 1 20:11:19 2013 (r248984) @@ -680,10 +680,12 @@ ath_edma_rxbuf_free(struct ath_softc *sc ATH_RX_LOCK_ASSERT(sc); - /* We're doing this multiple times? */ - bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); - + /* + * Only unload the frame if we haven't consumed + * the mbuf via ath_rx_pkt(). + */ if (bf->bf_m) { + bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); m_freem(bf->bf_m); bf->bf_m = NULL; }