Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci PR 6852 from Chris Jones <cjones@hideo.nervana.m...
details: https://anonhg.NetBSD.org/src/rev/ada21bc524e6
branches: trunk
changeset: 471816:ada21bc524e6
user: cjs <cjs%NetBSD.org@localhost>
date: Mon Apr 12 04:31:55 1999 +0000
description:
PR 6852 from Chris Jones <cjones%hideo.nervana.montana.edu@localhost>.
This handles the interrupt structure of Compex boards.
diffstat:
sys/dev/pci/if_de.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 42 insertions(+), 2 deletions(-)
diffs (72 lines):
diff -r ff33bc706473 -r ada21bc524e6 sys/dev/pci/if_de.c
--- a/sys/dev/pci/if_de.c Mon Apr 12 03:53:13 1999 +0000
+++ b/sys/dev/pci/if_de.c Mon Apr 12 04:31:55 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.84 1999/04/12 04:31:55 cjs 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