aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bfe
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/bfe
parent4f655310bff3d8052e35426ad6188a81147a7ed9 (diff)
Notes
Diffstat (limited to 'sys/dev/bfe')
-rw-r--r--sys/dev/bfe/if_bfe.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/bfe/if_bfe.c b/sys/dev/bfe/if_bfe.c
index 1e22d5625f66b..198b75724467e 100644
--- a/sys/dev/bfe/if_bfe.c
+++ b/sys/dev/bfe/if_bfe.c
@@ -364,12 +364,12 @@ bfe_dma_free(struct bfe_softc *sc)
/* Tx ring. */
if (sc->bfe_tx_tag != NULL) {
- if (sc->bfe_tx_map != NULL)
+ if (sc->bfe_tx_dma != 0)
bus_dmamap_unload(sc->bfe_tx_tag, sc->bfe_tx_map);
- if (sc->bfe_tx_map != NULL && sc->bfe_tx_list != NULL)
+ if (sc->bfe_tx_list != NULL)
bus_dmamem_free(sc->bfe_tx_tag, sc->bfe_tx_list,
sc->bfe_tx_map);
- sc->bfe_tx_map = NULL;
+ sc->bfe_tx_dma = 0;
sc->bfe_tx_list = NULL;
bus_dma_tag_destroy(sc->bfe_tx_tag);
sc->bfe_tx_tag = NULL;
@@ -377,12 +377,12 @@ bfe_dma_free(struct bfe_softc *sc)
/* Rx ring. */
if (sc->bfe_rx_tag != NULL) {
- if (sc->bfe_rx_map != NULL)
+ if (sc->bfe_rx_dma != 0)
bus_dmamap_unload(sc->bfe_rx_tag, sc->bfe_rx_map);
- if (sc->bfe_rx_map != NULL && sc->bfe_rx_list != NULL)
+ if (sc->bfe_rx_list != NULL)
bus_dmamem_free(sc->bfe_rx_tag, sc->bfe_rx_list,
sc->bfe_rx_map);
- sc->bfe_rx_map = NULL;
+ sc->bfe_rx_dma = 0;
sc->bfe_rx_list = NULL;
bus_dma_tag_destroy(sc->bfe_rx_tag);
sc->bfe_rx_tag = NULL;