Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ath/if_ath_tx_edma.c
Show First 20 Lines • Show All 531 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Drain all TXQs, potentially after completing the existing completed | * Drain all TXQs, potentially after completing the existing completed | ||||
* frames. | * frames. | ||||
*/ | */ | ||||
static void | static void | ||||
ath_edma_tx_drain(struct ath_softc *sc, ATH_RESET_TYPE reset_type) | ath_edma_tx_drain(struct ath_softc *sc, ATH_RESET_TYPE reset_type) | ||||
{ | { | ||||
struct ifnet *ifp = sc->sc_ifp; | |||||
int i; | int i; | ||||
DPRINTF(sc, ATH_DEBUG_RESET, "%s: called\n", __func__); | DPRINTF(sc, ATH_DEBUG_RESET, "%s: called\n", __func__); | ||||
(void) ath_stoptxdma(sc); | (void) ath_stoptxdma(sc); | ||||
/* | /* | ||||
* If reset type is noloss, the TX FIFO needs to be serviced | * If reset type is noloss, the TX FIFO needs to be serviced | ||||
Show All 25 Lines | for (i = 0; i < HAL_NUM_TX_QUEUES; i++) { | ||||
ath_tx_draintxq(sc, &sc->sc_txq[i]); | ath_tx_draintxq(sc, &sc->sc_txq[i]); | ||||
} | } | ||||
} | } | ||||
/* XXX dump out the TX completion FIFO contents */ | /* XXX dump out the TX completion FIFO contents */ | ||||
/* XXX dump out the frames */ | /* XXX dump out the frames */ | ||||
IF_LOCK(&ifp->if_snd); | |||||
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; | |||||
IF_UNLOCK(&ifp->if_snd); | |||||
sc->sc_wd_timer = 0; | sc->sc_wd_timer = 0; | ||||
} | } | ||||
/* | /* | ||||
* TX completion tasklet. | * TX completion tasklet. | ||||
*/ | */ | ||||
static void | static void | ||||
▲ Show 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | #endif | ||||
*/ | */ | ||||
ATH_TXQ_LOCK(txq); | ATH_TXQ_LOCK(txq); | ||||
if (dosched) | if (dosched) | ||||
ath_edma_tx_fifo_fill(sc, txq); | ath_edma_tx_fifo_fill(sc, txq); | ||||
ATH_TXQ_UNLOCK(txq); | ATH_TXQ_UNLOCK(txq); | ||||
} | } | ||||
sc->sc_wd_timer = 0; | sc->sc_wd_timer = 0; | ||||
if (idx > 0) { | |||||
IF_LOCK(&sc->sc_ifp->if_snd); | |||||
sc->sc_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; | |||||
IF_UNLOCK(&sc->sc_ifp->if_snd); | |||||
} | |||||
/* Kick software scheduler */ | /* Kick software scheduler */ | ||||
/* | /* | ||||
* XXX It's inefficient to do this if the FIFO queue is full, | * XXX It's inefficient to do this if the FIFO queue is full, | ||||
* but there's no easy way right now to only populate | * but there's no easy way right now to only populate | ||||
* the txq task for _one_ TXQ. This should be fixed. | * the txq task for _one_ TXQ. This should be fixed. | ||||
*/ | */ | ||||
if (dosched) | if (dosched) | ||||
Show All 36 Lines |