Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic So, while the DEC chips and other clones want no ...



details:   https://anonhg.NetBSD.org/src/rev/9a2467aa4642
branches:  trunk
changeset: 486560:9a2467aa4642
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu May 25 18:46:07 2000 +0000

description:
So, while the DEC chips and other clones want no FS|LS in the
setup descriptor, apparently the Xircom X3201-3 requires it.

diffstat:

 sys/dev/ic/tulip.c    |  20 ++++++++++++++++++--
 sys/dev/ic/tulipvar.h |   4 +++-
 2 files changed, 21 insertions(+), 3 deletions(-)

diffs (59 lines):

diff -r 4e5289be74d6 -r 9a2467aa4642 sys/dev/ic/tulip.c
--- a/sys/dev/ic/tulip.c        Thu May 25 18:39:09 2000 +0000
+++ b/sys/dev/ic/tulip.c        Thu May 25 18:46:07 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tulip.c,v 1.66 2000/05/25 16:37:33 thorpej Exp $       */
+/*     $NetBSD: tulip.c,v 1.67 2000/05/25 18:46:07 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -261,6 +261,21 @@
        }
 
        /*
+        * Default to no FS|LS in setup packet descriptors.  They're
+        * supposed to be zero according to the 21040 and 21143
+        * manuals, and some chips fall over badly if they're
+        * included.  Yet, other chips seem to require them.  Sigh.
+        */
+       switch (sc->sc_chip) {
+       case TULIP_CHIP_X3201_3:
+               sc->sc_setup_fsls = TDCTL_Tx_FS|TDCTL_Tx_LS;
+               break;
+
+       default:
+               sc->sc_setup_fsls = 0;
+       }
+
+       /*
         * Set up various chip-specific quirks.
         *
         * Note that wherever we can, we use the "ring" option for
@@ -2645,7 +2660,8 @@
            htole32(TULIP_CDSPADDR(sc));
        sc->sc_txdescs[sc->sc_txnext].td_ctl =
            htole32((TULIP_SETUP_PACKET_LEN << TDCTL_SIZE1_SHIFT) |
-           sc->sc_filtmode | TDCTL_Tx_SET | TDCTL_Tx_IC | sc->sc_tdctl_ch |
+           sc->sc_filtmode | TDCTL_Tx_SET | sc->sc_setup_fsls |
+           TDCTL_Tx_IC | sc->sc_tdctl_ch |
            (sc->sc_txnext == (TULIP_NTXDESC - 1) ? sc->sc_tdctl_er : 0));
        sc->sc_txdescs[sc->sc_txnext].td_status = htole32(TDSTAT_OWN);
        TULIP_CDTXSYNC(sc, sc->sc_txnext, txs->txs_ndescs,
diff -r 4e5289be74d6 -r 9a2467aa4642 sys/dev/ic/tulipvar.h
--- a/sys/dev/ic/tulipvar.h     Thu May 25 18:39:09 2000 +0000
+++ b/sys/dev/ic/tulipvar.h     Thu May 25 18:46:07 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tulipvar.h,v 1.34 2000/05/25 16:47:18 thorpej Exp $    */
+/*     $NetBSD: tulipvar.h,v 1.35 2000/05/25 18:46:08 thorpej Exp $    */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -415,6 +415,8 @@
        u_int32_t sc_tdctl_ch;          /* conditional desc chaining */
        u_int32_t sc_tdctl_er;          /* conditional desc end-of-ring */
 
+       u_int32_t sc_setup_fsls;        /* FS|LS on setup descriptor */
+
        struct tulip_txsq sc_txfreeq;   /* free Tx descsofts */
        struct tulip_txsq sc_txdirtyq;  /* dirty Tx descsofts */
 



Home | Main Index | Thread Index | Old Index