diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2014-06-11 14:53:58 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2014-06-11 14:53:58 +0000 |
| commit | 068d8643adb13434b57fdd5febf43a11194d508f (patch) | |
| tree | 5544dcfb2be4391a29657081ad30163d6c502e86 /sys/dev/sge | |
| parent | 4f655310bff3d8052e35426ad6188a81147a7ed9 (diff) | |
Notes
Diffstat (limited to 'sys/dev/sge')
| -rw-r--r-- | sys/dev/sge/if_sge.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/sge/if_sge.c b/sys/dev/sge/if_sge.c index 20c14289111e..077440646e04 100644 --- a/sys/dev/sge/if_sge.c +++ b/sys/dev/sge/if_sge.c @@ -916,25 +916,25 @@ sge_dma_free(struct sge_softc *sc) ld = &sc->sge_ldata; /* Rx ring. */ if (cd->sge_rx_tag != NULL) { - if (cd->sge_rx_dmamap != NULL) + if (ld->sge_rx_paddr != 0) bus_dmamap_unload(cd->sge_rx_tag, cd->sge_rx_dmamap); - if (cd->sge_rx_dmamap != NULL && ld->sge_rx_ring != NULL) + if (ld->sge_rx_ring != NULL) bus_dmamem_free(cd->sge_rx_tag, ld->sge_rx_ring, cd->sge_rx_dmamap); ld->sge_rx_ring = NULL; - cd->sge_rx_dmamap = NULL; + ld->sge_rx_paddr = 0; bus_dma_tag_destroy(cd->sge_rx_tag); cd->sge_rx_tag = NULL; } /* Tx ring. */ if (cd->sge_tx_tag != NULL) { - if (cd->sge_tx_dmamap != NULL) + if (ld->sge_tx_paddr != 0) bus_dmamap_unload(cd->sge_tx_tag, cd->sge_tx_dmamap); - if (cd->sge_tx_dmamap != NULL && ld->sge_tx_ring != NULL) + if (ld->sge_tx_ring != NULL) bus_dmamem_free(cd->sge_tx_tag, ld->sge_tx_ring, cd->sge_tx_dmamap); ld->sge_tx_ring = NULL; - cd->sge_tx_dmamap = NULL; + ld->sge_tx_paddr = 0; bus_dma_tag_destroy(cd->sge_tx_tag); cd->sge_tx_tag = NULL; } |
