Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Don't attempt to do transmit threshold tuning on ...



details:   https://anonhg.NetBSD.org/src/rev/55cc9eba294b
branches:  trunk
changeset: 475979:55cc9eba294b
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Sep 01 20:11:19 1999 +0000

description:
Don't attempt to do transmit threshold tuning on the Lite-On PNCI; just
put it in Store-and-Forward mode right from the get-go.  This eliminates
the DMA underrun errors that prevented the receive filter setup from working
and caused smashed packets to go out onto the wire.

My NetGear FA310-TX board now works.

There are still "filter setup failed to complete" messages, however they
don't appear to indicate that the filter setup actually failed, since
unicast and multicast packet reception work fine.  I will address this
problem shortly.

Reading the log for the FreeBSD `pn' driver suggests that these chips are,
in fact, pretty crappy, riddled with hardware bugs (for which more workarounds
are coming).

diffstat:

 sys/dev/ic/tulip.c |  17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r 5d3372c07789 -r 55cc9eba294b sys/dev/ic/tulip.c
--- a/sys/dev/ic/tulip.c        Wed Sep 01 18:03:10 1999 +0000
+++ b/sys/dev/ic/tulip.c        Wed Sep 01 20:11:19 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tulip.c,v 1.2 1999/09/01 05:07:03 thorpej Exp $        */
+/*     $NetBSD: tulip.c,v 1.3 1999/09/01 20:11:19 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -111,6 +111,12 @@
        { 0,                    NULL },
 };
 
+#define        TXTH_72         0
+#define        TXTH_96         1
+#define        TXTH_128        2
+#define        TXTH_160        3
+#define        TXTH_SF         4
+
 void   tlp_start __P((struct ifnet *));
 void   tlp_watchdog __P((struct ifnet *));
 int    tlp_ioctl __P((struct ifnet *, u_long, caddr_t));
@@ -206,6 +212,15 @@
         * Set up various chip-specific quirks.
         */
        switch (sc->sc_chip) {
+       case TULIP_CHIP_82C168:
+       case TULIP_CHIP_82C169:
+               /*
+                * These chips seem to have busted DMA engines; just put them
+                * in Store-and-Forward mode from the get-go.
+                */
+               sc->sc_txthresh = TXTH_SF;
+               break;
+
        case TULIP_CHIP_WB89C840F:
                sc->sc_flags |= TULIPF_IC_FS;
                break;



Home | Main Index | Thread Index | Old Index