diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2005-02-17 17:30:23 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2005-02-17 17:30:23 +0000 |
commit | 0c8988d6d3798a8b6eefa67487cefb028818c25b (patch) | |
tree | c8f05b599e159bbf829941cbd2e48c58b731c0b8 /sys/dev/ic | |
parent | 4618007d80cca92214b00d1dd3f8326981c4cbb3 (diff) |
unmap DMA allocated memory properly.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/ral.c | 6 |
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); } |