Cache the tx producer index instead of reading it every time ti_start is
called.
This commit is contained in:
parent
fd8dcc6063
commit
7e6d523277
@ -1727,6 +1727,7 @@ ti_init_tx_ring(sc)
|
||||
{
|
||||
sc->ti_txcnt = 0;
|
||||
sc->ti_tx_saved_considx = 0;
|
||||
sc->ti_tx_saved_prodidx = 0;
|
||||
CSR_WRITE_4(sc, TI_MB_SENDPROD_IDX, 0);
|
||||
return (0);
|
||||
}
|
||||
@ -3102,7 +3103,7 @@ ti_start_locked(ifp)
|
||||
|
||||
sc = ifp->if_softc;
|
||||
|
||||
prodidx = CSR_READ_4(sc, TI_MB_SENDPROD_IDX);
|
||||
prodidx = sc->ti_tx_saved_prodidx;
|
||||
|
||||
while (sc->ti_cdata.ti_tx_chain[prodidx] == NULL) {
|
||||
IF_DEQUEUE(&ifp->if_snd, m_head);
|
||||
@ -3146,6 +3147,7 @@ ti_start_locked(ifp)
|
||||
}
|
||||
|
||||
/* Transmit */
|
||||
sc->ti_tx_saved_prodidx = prodidx;
|
||||
CSR_WRITE_4(sc, TI_MB_SENDPROD_IDX, prodidx);
|
||||
|
||||
/*
|
||||
|
@ -1009,6 +1009,7 @@ struct ti_softc {
|
||||
#define ti_ev_prodidx ti_rdata->ti_ev_prodidx_r
|
||||
#define ti_return_prodidx ti_rdata->ti_return_prodidx_r
|
||||
#define ti_tx_considx ti_rdata->ti_tx_considx_r
|
||||
u_int16_t ti_tx_saved_prodidx;
|
||||
u_int16_t ti_tx_saved_considx;
|
||||
u_int16_t ti_rx_saved_considx;
|
||||
u_int16_t ti_ev_saved_considx;
|
||||
|
Loading…
x
Reference in New Issue
Block a user