svn commit: r208315 - stable/7/sys/dev/fxp

Pyun YongHyeon yongari at FreeBSD.org
Wed May 19 21:02:02 UTC 2010


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;


More information about the svn-src-stable-7 mailing list