diff options
| author | Ian Lepore <ian@FreeBSD.org> | 2014-11-24 16:12:11 +0000 |
|---|---|---|
| committer | Ian Lepore <ian@FreeBSD.org> | 2014-11-24 16:12:11 +0000 |
| commit | e56e554106b288513f93d06e1f650c2e5979c6e4 (patch) | |
| tree | 4df30dc4da2b37f6208cabf8e228a516b6cb4af9 /sys/dev/ffec | |
| parent | 894d1973f1fd537772cdbcf212f59e59e7404b99 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ffec')
| -rw-r--r-- | sys/dev/ffec/if_ffec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/ffec/if_ffec.c b/sys/dev/ffec/if_ffec.c index b8230164367d..e7749a1f0b54 100644 --- a/sys/dev/ffec/if_ffec.c +++ b/sys/dev/ffec/if_ffec.c @@ -652,7 +652,9 @@ ffec_txstart_locked(struct ffec_softc *sc) } if (enqueued != 0) { + bus_dmamap_sync(sc->txdesc_tag, sc->txdesc_map, BUS_DMASYNC_PREWRITE); WR4(sc, FEC_TDAR_REG, FEC_TDAR_TDAR); + bus_dmamap_sync(sc->txdesc_tag, sc->txdesc_map, BUS_DMASYNC_POSTWRITE); sc->tx_watchdog_count = WATCHDOG_TIMEOUT_SECS; } } @@ -677,6 +679,9 @@ ffec_txfinish_locked(struct ffec_softc *sc) FFEC_ASSERT_LOCKED(sc); + /* XXX Can't set PRE|POST right now, but we need both. */ + bus_dmamap_sync(sc->txdesc_tag, sc->txdesc_map, BUS_DMASYNC_PREREAD); + bus_dmamap_sync(sc->txdesc_tag, sc->txdesc_map, BUS_DMASYNC_POSTREAD); ifp = sc->ifp; retired_buffer = false; while (sc->tx_idx_tail != sc->tx_idx_head) { @@ -841,6 +846,9 @@ ffec_rxfinish_locked(struct ffec_softc *sc) FFEC_ASSERT_LOCKED(sc); + /* XXX Can't set PRE|POST right now, but we need both. */ + bus_dmamap_sync(sc->rxdesc_tag, sc->rxdesc_map, BUS_DMASYNC_PREREAD); + bus_dmamap_sync(sc->rxdesc_tag, sc->rxdesc_map, BUS_DMASYNC_POSTREAD); produced_empty_buffer = false; for (;;) { desc = &sc->rxdesc_ring[sc->rx_idx]; @@ -888,7 +896,9 @@ ffec_rxfinish_locked(struct ffec_softc *sc) } if (produced_empty_buffer) { + bus_dmamap_sync(sc->rxdesc_tag, sc->txdesc_map, BUS_DMASYNC_PREWRITE); WR4(sc, FEC_RDAR_REG, FEC_RDAR_RDAR); + bus_dmamap_sync(sc->rxdesc_tag, sc->txdesc_map, BUS_DMASYNC_POSTWRITE); } } |
