Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/dev/pci pullup 1.83->1.84 (cjs): recognise/support ...



details:   https://anonhg.NetBSD.org/src/rev/cb1e71004481
branches:  netbsd-1-4
changeset: 468530:cb1e71004481
user:      perry <perry%NetBSD.org@localhost>
date:      Wed Apr 28 19:08:02 1999 +0000

description:
pullup 1.83->1.84 (cjs): recognise/support Comtex boards.

diffstat:

 sys/dev/pci/if_de.c |  44 ++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 42 insertions(+), 2 deletions(-)

diffs (72 lines):

diff -r efe3f1849d22 -r cb1e71004481 sys/dev/pci/if_de.c
--- a/sys/dev/pci/if_de.c       Wed Apr 28 19:02:25 1999 +0000
+++ b/sys/dev/pci/if_de.c       Wed Apr 28 19:08:02 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_de.c,v 1.83 1999/04/01 11:02:20 tsubai Exp $        */
+/*     $NetBSD: if_de.c,v 1.83.2.1 1999/04/28 19:08:02 perry Exp $     */
 
 /*-
  * Copyright (c) 1994-1997 Matt Thomas (matt%3am-software.com@localhost)
@@ -2372,6 +2372,45 @@
     }
 }
 
+static void
+tulip_identify_compex_nic(
+    tulip_softc_t * const sc)
+{
+    strcpy(sc->tulip_boardid, "COMPEX ");
+    if (sc->tulip_chipid == TULIP_21140A) {
+       int root_unit;
+       tulip_softc_t *root_sc = NULL;
+
+       strcat(sc->tulip_boardid, "400TX/PCI ");
+       /*
+        * All 4 chips on these boards share an interrupt.  This code
+        * copied from tulip_read_macaddr.
+        */
+       sc->tulip_features |= TULIP_HAVE_SHAREDINTR;
+       for (root_unit = sc->tulip_unit - 1; root_unit >= 0; root_unit--) {
+           root_sc = TULIP_UNIT_TO_SOFTC(root_unit);
+           if (root_sc == NULL
+               || !(root_sc->tulip_features & TULIP_HAVE_SLAVEDINTR))
+               break;
+           root_sc = NULL;
+       }
+       if (root_sc != NULL
+           && root_sc->tulip_chipid == sc->tulip_chipid
+           && root_sc->tulip_pci_busno == sc->tulip_pci_busno) {
+           sc->tulip_features |= TULIP_HAVE_SLAVEDINTR;
+           sc->tulip_slaves = root_sc->tulip_slaves;
+           root_sc->tulip_slaves = sc;
+       } else if(sc->tulip_features & TULIP_HAVE_SLAVEDINTR) {
+           printf("\nCannot find master device for de%d interrupts",
+                  sc->tulip_unit);
+       }
+    } else {
+       strcat(sc->tulip_boardid, "unknown ");
+    }
+    /*      sc->tulip_boardsw = &tulip_21140_eb_boardsw; */
+    return;
+}
+
 static int
 tulip_srom_decode(
     tulip_softc_t * const sc)
@@ -2746,6 +2785,7 @@
     { tulip_identify_cogent_nic,       { 0x00, 0x00, 0x92 } },
     { tulip_identify_asante_nic,       { 0x00, 0x00, 0x94 } },
     { tulip_identify_accton_nic,       { 0x00, 0x00, 0xE8 } },
+    { tulip_identify_compex_nic,        { 0x00, 0x80, 0x48 } },
     { NULL }
 };
 
@@ -2800,7 +2840,7 @@
             * it's the best we can do until every one switches to
             * the new SROM format.
             */
-            
+
            sc->tulip_boardsw = &tulip_21140_eb_boardsw;
        }
        tulip_srom_read(sc);



Home | Main Index | Thread Index | Old Index