Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2010 21:02:02 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r208315 - stable/7/sys/dev/fxp
Message-ID:  <201005192102.o4JL22RL087283@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005192102.o4JL22RL087283>