Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci * Make sure the interrupt-delay bit gets set on ...
details: https://anonhg.NetBSD.org/src/rev/ca26b7381e88
branches: trunk
changeset: 526697:ca26b7381e88
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed May 08 21:22:20 2002 +0000
description:
* Make sure the interrupt-delay bit gets set on ALL descriptors,
except for the one we want to force a Tx interrupt.
* Tweak the Tx descriptor accounting a little.
diffstat:
sys/dev/pci/if_wm.c | 22 ++++++++--------------
1 files changed, 8 insertions(+), 14 deletions(-)
diffs (71 lines):
diff -r f88807cee14c -r ca26b7381e88 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Wed May 08 19:00:27 2002 +0000
+++ b/sys/dev/pci/if_wm.c Wed May 08 21:22:20 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.5 2002/05/08 19:00:27 thorpej Exp $ */
+/* $NetBSD: if_wm.c,v 1.6 2002/05/08 21:22:20 thorpej Exp $ */
/*
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -1015,7 +1015,7 @@
t->tcpip_ipcs = ipcs;
t->tcpip_tucs = tucs;
t->tcpip_cmdlen =
- htole32(WTX_CMD_DEXT | WTX_CMD_IDE | WTX_DTYP_C) | tcmd;
+ htole32(WTX_CMD_DEXT | WTX_DTYP_C) | tcmd;
t->tcpip_seg = 0;
WM_CDTXSYNC(sc, sc->sc_txnext, 1, BUS_DMASYNC_PREWRITE);
@@ -1164,6 +1164,7 @@
* is used to set the checksum context).
*/
txs->txs_mbuf = m0;
+ txs->txs_firstdesc = sc->sc_txnext;
txs->txs_ndesc = dmamap->dm_nsegs;
/*
@@ -1185,6 +1186,8 @@
cksumfields = 0;
}
+ cksumcmd |= htole32(WTX_CMD_IDE);
+
/*
* Initialize the transmit descriptor.
*/
@@ -1241,6 +1244,8 @@
}
#endif /* XXXJRT */
+ txs->txs_lastdesc = lasttx;
+
DPRINTF(WM_DEBUG_TX,
("%s: TX: desc %d: cmdlen 0x%08x\n", sc->sc_dev.dv_xname,
lasttx, sc->sc_txdescs[lasttx].wtx_cmdlen));
@@ -1255,17 +1260,6 @@
DPRINTF(WM_DEBUG_TX,
("%s: TX: TDT -> %d\n", sc->sc_dev.dv_xname, nexttx));
- /*
- * Remember that txdirty will be once the packet is
- * done.
- *
- * Note: If we're doing checksum offload, we are actually
- * using one descriptor before firstdesc, but it doesn't
- * really matter.
- */
- txs->txs_firstdesc = sc->sc_txnext;
- txs->txs_lastdesc = lasttx;
-
DPRINTF(WM_DEBUG_TX,
("%s: TX: finished transmitting packet, job %d\n",
sc->sc_dev.dv_xname, sc->sc_txsnext));
@@ -1284,7 +1278,7 @@
#endif /* NBPFILTER > 0 */
}
- if (sc->sc_txsfree == 0 || sc->sc_txfree == 0) {
+ if (sc->sc_txsfree == 0 || sc->sc_txfree <= 2) {
/* No more slots; notify upper layer. */
ifp->if_flags |= IFF_OACTIVE;
}
Home |
Main Index |
Thread Index |
Old Index