Fix the TX underrun status reset; remove a now unused variable.

Submitted by: Luiz Otavio O Souza
This commit is contained in:
Adrian Chadd 2011-03-13 08:34:14 +00:00
parent 2b60eabf75
commit 85a5701186
2 changed files with 1 additions and 3 deletions

View File

@ -1424,7 +1424,6 @@ arge_tx_ring_init(struct arge_softc *sc)
sc->arge_cdata.arge_tx_prod = 0;
sc->arge_cdata.arge_tx_cons = 0;
sc->arge_cdata.arge_tx_cnt = 0;
sc->arge_cdata.arge_tx_pkts = 0;
rd = &sc->arge_rdata;
bzero(rd->arge_tx_ring, sizeof(rd->arge_tx_ring));
@ -1784,7 +1783,7 @@ arge_intr(void *arg)
*/
if (status & DMA_INTR_TX_UNDERRUN) {
ARGE_WRITE(sc, AR71XX_DMA_TX_STATUS, DMA_TX_STATUS_UNDERRUN);
if (sc->arge_cdata.arge_tx_pkts > 0 ) {
if (sc->arge_cdata.arge_tx_cnt > 0 ) {
ARGE_WRITE(sc, AR71XX_DMA_TX_CONTROL,
DMA_TX_CONTROL_EN);
}

View File

@ -110,7 +110,6 @@ struct arge_chain_data {
bus_dmamap_t arge_tx_ring_map;
bus_dmamap_t arge_rx_ring_map;
bus_dmamap_t arge_rx_sparemap;
int arge_tx_pkts;
int arge_tx_prod;
int arge_tx_cons;
int arge_tx_cnt;