summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorjmg <jmg@FreeBSD.org>2004-11-17 21:35:22 +0000
committerjmg <jmg@FreeBSD.org>2004-11-17 21:35:22 +0000
commit268776548370dcc4d43866d599e34d6c3565f326 (patch)
tree38021d37d348b8ec905bb4efde1c975da05918f0 /sys/pci
parent95d6e9930c86f1c8222050af8b6f657bdbf6660e (diff)
downloadFreeBSD-src-268776548370dcc4d43866d599e34d6c3565f326.zip
FreeBSD-src-268776548370dcc4d43866d599e34d6c3565f326.tar.gz
only clear the IFF_OACTIVE flag when we have a chance of being able to
queue a packet to the hardware... instead of when the hardware queue is empty.. don't initalize cur_tx now that it doesn't need to be... Pointed out by: bde
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_sk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/pci/if_sk.c b/sys/pci/if_sk.c
index d1ce5ac..c31b88c 100644
--- a/sys/pci/if_sk.c
+++ b/sys/pci/if_sk.c
@@ -1991,7 +1991,7 @@ sk_txeof(sc_if)
struct sk_if_softc *sc_if;
{
struct sk_softc *sc;
- struct sk_tx_desc *cur_tx = NULL;
+ struct sk_tx_desc *cur_tx;
struct ifnet *ifp;
u_int32_t idx;
@@ -2019,13 +2019,13 @@ sk_txeof(sc_if)
if (sc_if->sk_cdata.sk_tx_cnt == 0) {
ifp->if_timer = 0;
- ifp->if_flags &= ~IFF_OACTIVE;
} else /* nudge chip to keep tx ring moving */
CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START);
- sc_if->sk_cdata.sk_tx_cons = idx;
+ if (sc_if->sk_cdata.sk_tx_cnt < SK_TX_RING_CNT - 2)
+ ifp->if_flags &= ~IFF_OACTIVE;
- return;
+ sc_if->sk_cdata.sk_tx_cons = idx;
}
static void
OpenPOWER on IntegriCloud