| 1 |
struct GTeth_desc |
| 2 |
{ |
| 3 |
unsigned ed_cmdsts; |
| 4 |
}; |
| 5 |
struct GTeth_softc |
| 6 |
{ |
| 7 |
struct GTeth_desc txq_desc[32]; |
| 8 |
unsigned int txq_fi; |
| 9 |
unsigned int txq_nactive; |
| 10 |
}; |
| 11 |
|
| 12 |
void |
| 13 |
GTeth_txq_free (struct GTeth_softc *sc) |
| 14 |
{ |
| 15 |
struct GTeth_desc *txd = &sc->txq_desc[0]; |
| 16 |
txd->ed_cmdsts &= ~(1U << (31)); |
| 17 |
} |
| 18 |
void |
| 19 |
GTeth_txq_done (struct GTeth_softc *sc) |
| 20 |
{ |
| 21 |
while (sc->txq_nactive > 0) |
| 22 |
{ |
| 23 |
volatile struct GTeth_desc *txd = &sc->txq_desc[sc->txq_fi]; |
| 24 |
if (txd->ed_cmdsts) |
| 25 |
{ |
| 26 |
if (sc->txq_nactive == 1) |
| 27 |
return; |
| 28 |
} |
| 29 |
GTeth_txq_free (sc); |
| 30 |
} |
| 31 |
} |