summaryrefslogtreecommitdiffstats
path: root/sys/dev/ti/if_ti.c
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2005-12-28 08:36:32 +0000
committerscottl <scottl@FreeBSD.org>2005-12-28 08:36:32 +0000
commit7e6d523277e374d6fb430c5f16dc385f2d167f21 (patch)
tree68fb1a7659b4001d58c1edf80a012a20d2b9fc93 /sys/dev/ti/if_ti.c
parentfd8dcc60632d830d528145f318c244167d40e963 (diff)
downloadFreeBSD-src-7e6d523277e374d6fb430c5f16dc385f2d167f21.zip
FreeBSD-src-7e6d523277e374d6fb430c5f16dc385f2d167f21.tar.gz
Cache the tx producer index instead of reading it every time ti_start is
called.
Diffstat (limited to 'sys/dev/ti/if_ti.c')
-rw-r--r--sys/dev/ti/if_ti.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index 4a8c5fa..9fbe805 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -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);
/*
OpenPOWER on IntegriCloud