summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ral.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/ral.c')
-rw-r--r--sys/dev/ic/ral.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ic/ral.c b/sys/dev/ic/ral.c
index 63faeccdb57..3a5b6ff358e 100644
--- a/sys/dev/ic/ral.c
+++ b/sys/dev/ic/ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ral.c,v 1.2 2005/02/17 17:26:30 damien Exp $ */
+/* $OpenBSD: ral.c,v 1.3 2005/02/17 17:30:22 damien Exp $ */
/*-
* Copyright (c) 2005
@@ -579,6 +579,8 @@ ral_free_tx_ring(struct ral_softc *sc, struct ral_tx_ring *ring)
bus_dmamap_sync(sc->sc_dmat, ring->map, 0,
ring->map->dm_mapsize, BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(sc->sc_dmat, ring->map);
+ bus_dmamem_unmap(sc->sc_dmat, (caddr_t)ring->desc,
+ ring->count * RAL_TX_DESC_SIZE);
bus_dmamem_free(sc->sc_dmat, &ring->seg, 1);
}
@@ -740,6 +742,8 @@ ral_free_rx_ring(struct ral_softc *sc, struct ral_rx_ring *ring)
bus_dmamap_sync(sc->sc_dmat, ring->map, 0,
ring->map->dm_mapsize, BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(sc->sc_dmat, ring->map);
+ bus_dmamem_unmap(sc->sc_dmat, (caddr_t)ring->desc,
+ ring->count * RAL_RX_DESC_SIZE);
bus_dmamem_free(sc->sc_dmat, &ring->seg, 1);
}