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.
This commit is contained in:
Pyun YongHyeon 2010-05-19 20:56:18 +00:00
parent eb167404df
commit 71cfff63cb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/8/; revision=208314

View File

@ -1899,7 +1899,7 @@ fxp_intr_body(struct fxp_softc *sc, struct ifnet *ifp, uint8_t statack,
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, struct fxp_rx *rxp)
/* 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, struct fxp_rx *rxp)
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;