aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/stge
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2014-06-11 14:53:58 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2014-06-11 14:53:58 +0000
commit068d8643adb13434b57fdd5febf43a11194d508f (patch)
tree5544dcfb2be4391a29657081ad30163d6c502e86 /sys/dev/stge
parent4f655310bff3d8052e35426ad6188a81147a7ed9 (diff)
Notes
Diffstat (limited to 'sys/dev/stge')
-rw-r--r--sys/dev/stge/if_stge.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/stge/if_stge.c b/sys/dev/stge/if_stge.c
index 8a6f7b0ed82c..6f4ee8c8815b 100644
--- a/sys/dev/stge/if_stge.c
+++ b/sys/dev/stge/if_stge.c
@@ -902,31 +902,29 @@ stge_dma_free(struct stge_softc *sc)
/* Tx ring */
if (sc->sc_cdata.stge_tx_ring_tag) {
- if (sc->sc_cdata.stge_tx_ring_map)
+ if (sc->sc_rdata.stge_tx_ring_paddr)
bus_dmamap_unload(sc->sc_cdata.stge_tx_ring_tag,
sc->sc_cdata.stge_tx_ring_map);
- if (sc->sc_cdata.stge_tx_ring_map &&
- sc->sc_rdata.stge_tx_ring)
+ if (sc->sc_rdata.stge_tx_ring)
bus_dmamem_free(sc->sc_cdata.stge_tx_ring_tag,
sc->sc_rdata.stge_tx_ring,
sc->sc_cdata.stge_tx_ring_map);
sc->sc_rdata.stge_tx_ring = NULL;
- sc->sc_cdata.stge_tx_ring_map = 0;
+ sc->sc_rdata.stge_tx_ring_paddr = 0;
bus_dma_tag_destroy(sc->sc_cdata.stge_tx_ring_tag);
sc->sc_cdata.stge_tx_ring_tag = NULL;
}
/* Rx ring */
if (sc->sc_cdata.stge_rx_ring_tag) {
- if (sc->sc_cdata.stge_rx_ring_map)
+ if (sc->sc_rdata.stge_rx_ring_paddr)
bus_dmamap_unload(sc->sc_cdata.stge_rx_ring_tag,
sc->sc_cdata.stge_rx_ring_map);
- if (sc->sc_cdata.stge_rx_ring_map &&
- sc->sc_rdata.stge_rx_ring)
+ if (sc->sc_rdata.stge_rx_ring)
bus_dmamem_free(sc->sc_cdata.stge_rx_ring_tag,
sc->sc_rdata.stge_rx_ring,
sc->sc_cdata.stge_rx_ring_map);
sc->sc_rdata.stge_rx_ring = NULL;
- sc->sc_cdata.stge_rx_ring_map = 0;
+ sc->sc_rdata.stge_rx_ring_paddr = 0;
bus_dma_tag_destroy(sc->sc_cdata.stge_rx_ring_tag);
sc->sc_cdata.stge_rx_ring_tag = NULL;
}