diff options
| author | Adrian Chadd <adrian@FreeBSD.org> | 2013-05-10 10:06:45 +0000 |
|---|---|---|
| committer | Adrian Chadd <adrian@FreeBSD.org> | 2013-05-10 10:06:45 +0000 |
| commit | 8328d6e4d416859891c2ad701c3258f7fe4690d7 (patch) | |
| tree | 2c968a1e648997097ec0de74ead473137884e107 | |
| parent | 4343d321e2cff33dcd4ecfbc9ff00125dbc47726 (diff) | |
Notes
| -rw-r--r-- | sys/dev/ath/if_ath.c | 16 | ||||
| -rw-r--r-- | sys/dev/ath/if_ath_tx_edma.c | 16 |
2 files changed, 30 insertions, 2 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 6f5fb455662bc..5331fd028141e 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -4668,9 +4668,21 @@ ath_legacy_tx_drain(struct ath_softc *sc, ATH_RESET_TYPE reset_type) if (sc->sc_debug & ATH_DEBUG_RESET) ath_tx_dump(sc, &sc->sc_txq[i]); #endif /* ATH_DEBUG */ - if (reset_type == ATH_RESET_NOLOSS) + if (reset_type == ATH_RESET_NOLOSS) { ath_tx_processq(sc, &sc->sc_txq[i], 0); - else + ATH_TXQ_LOCK(&sc->sc_txq[i]); + /* + * Free the holding buffer; DMA is now + * stopped. + */ + ath_txq_freeholdingbuf(sc, &sc->sc_txq[i]); + /* + * Reset the link pointer to NULL; there's + * no frames to chain DMA to. + */ + sc->sc_txq[i].axq_link = NULL; + ATH_TXQ_UNLOCK(&sc->sc_txq[i]); + } else ath_tx_draintxq(sc, &sc->sc_txq[i]); } } diff --git a/sys/dev/ath/if_ath_tx_edma.c b/sys/dev/ath/if_ath_tx_edma.c index b86352ac1cda6..5498dd5c5ed6a 100644 --- a/sys/dev/ath/if_ath_tx_edma.c +++ b/sys/dev/ath/if_ath_tx_edma.c @@ -551,6 +551,22 @@ ath_edma_tx_drain(struct ath_softc *sc, ATH_RESET_TYPE reset_type) */ if (reset_type == ATH_RESET_NOLOSS) { ath_edma_tx_processq(sc, 0); + for (i = 0; i < HAL_NUM_TX_QUEUES; i++) { + if (ATH_TXQ_SETUP(sc, i)) { + ATH_TXQ_LOCK(&sc->sc_txq[i]); + /* + * Free the holding buffer; DMA is now + * stopped. + */ + ath_txq_freeholdingbuf(sc, &sc->sc_txq[i]); + /* + * Reset the link pointer to NULL; there's + * no frames to chain DMA to. + */ + sc->sc_txq[i].axq_link = NULL; + ATH_TXQ_UNLOCK(&sc->sc_txq[i]); + } + } } else { for (i = 0; i < HAL_NUM_TX_QUEUES; i++) { if (ATH_TXQ_SETUP(sc, i)) |
