From owner-svn-src-stable-7@FreeBSD.ORG Wed May 19 21:02:02 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EBC21065674; Wed, 19 May 2010 21:02:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F17C8FC1E; Wed, 19 May 2010 21:02:02 +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 o4JL22oA087285; Wed, 19 May 2010 21:02:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JL22RL087283; Wed, 19 May 2010 21:02:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005192102.o4JL22RL087283@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 19 May 2010 21:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208315 - stable/7/sys/dev/fxp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 21:02:02 -0000 Author: yongari Date: Wed May 19 21:02:02 2010 New Revision: 208315 URL: http://svn.freebsd.org/changeset/base/208315 Log: MFC r208081,208083: r208081: Controller updates RFA via DMA so driver needs synchronization. Add missing BUS_DMASYNC_POSTWRITE and BUS_DMASYNC_PREREAD. r208083: Dont' allow dma map load deferring. fxp(4) is not able to handle EINPROGRESS. Modified: stable/7/sys/dev/fxp/if_fxp.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Wed May 19 20:56:18 2010 (r208314) +++ stable/7/sys/dev/fxp/if_fxp.c Wed May 19 21:02:02 2010 (r208315) @@ -1895,7 +1895,7 @@ fxp_intr_body(struct fxp_softc *sc, stru rfa = (struct fxp_rfa *)(m->m_ext.ext_buf + RFA_ALIGNMENT_FUDGE); bus_dmamap_sync(sc->fxp_rxmtag, rxp->rx_map, - BUS_DMASYNC_POSTREAD); + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); #ifdef DEVICE_POLLING /* loop at most count times if count >=0 */ if (count >= 0 && count-- == 0) { @@ -2617,7 +2617,7 @@ fxp_new_rfabuf(struct fxp_softc *sc, str /* Map the RFA into DMA memory. */ error = bus_dmamap_load(sc->fxp_rxmtag, sc->spare_map, rfa, MCLBYTES - RFA_ALIGNMENT_FUDGE, fxp_dma_map_addr, - &rxp->rx_addr, 0); + &rxp->rx_addr, BUS_DMA_NOWAIT); if (error) { m_freem(m); return (error); @@ -2653,7 +2653,7 @@ fxp_add_rfabuf(struct fxp_softc *sc, str le32enc(&p_rfa->link_addr, rxp->rx_addr); p_rfa->rfa_control = 0; bus_dmamap_sync(sc->fxp_rxmtag, p_rx->rx_map, - BUS_DMASYNC_PREWRITE); + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); } else { rxp->rx_next = NULL; sc->fxp_desc.rx_head = rxp;