Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2010 20:56:18 +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-8@freebsd.org
Subject:   svn commit: r208314 - stable/8/sys/dev/fxp
Message-ID:  <201005192056.o4JKuIOo085963@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Wed May 19 20:56:18 2010
New Revision: 208314
URL: http://svn.freebsd.org/changeset/base/208314

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/8/sys/dev/fxp/if_fxp.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/8/sys/dev/fxp/if_fxp.c	Wed May 19 20:53:21 2010	(r208313)
+++ stable/8/sys/dev/fxp/if_fxp.c	Wed May 19 20:56:18 2010	(r208314)
@@ -1899,7 +1899,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) {
@@ -2623,7 +2623,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);
@@ -2659,7 +2659,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?201005192056.o4JKuIOo085963>