Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Add a chip type for the Xircom X3201-3, and centrali...
details: https://anonhg.NetBSD.org/src/rev/a25e6a5a153f
branches: trunk
changeset: 481293:a25e6a5a153f
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Jan 25 19:29:17 2000 +0000
description:
Add a chip type for the Xircom X3201-3, and centralize the declaration
of the chip names array.
diffstat:
sys/dev/cardbus/if_tlp_cardbus.c | 8 +++-----
sys/dev/ic/tulip.c | 6 ++++--
sys/dev/ic/tulipvar.h | 8 ++++++--
sys/dev/pci/if_tlp_pci.c | 8 +++-----
4 files changed, 16 insertions(+), 14 deletions(-)
diffs (132 lines):
diff -r 1155c62e4623 -r a25e6a5a153f sys/dev/cardbus/if_tlp_cardbus.c
--- a/sys/dev/cardbus/if_tlp_cardbus.c Tue Jan 25 18:04:07 2000 +0000
+++ b/sys/dev/cardbus/if_tlp_cardbus.c Tue Jan 25 19:29:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tlp_cardbus.c,v 1.8 2000/01/25 15:29:43 mycroft Exp $ */
+/* $NetBSD: if_tlp_cardbus.c,v 1.9 2000/01/25 19:29:19 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -142,8 +142,6 @@
TULIP_CHIP_INVALID, 0 },
};
-const char *tlp_cardbus_chip_names[] = TULIP_CHIP_NAMES;
-
const struct tulip_cardbus_product *tlp_cardbus_lookup
__P((const struct cardbus_attach_args *));
@@ -154,7 +152,7 @@
const struct tulip_cardbus_product *tcp;
for (tcp = tlp_cardbus_products;
- tlp_cardbus_chip_names[tcp->tcp_chip] != NULL;
+ tlp_chip_names[tcp->tcp_chip] != NULL;
tcp++) {
if (PCI_VENDOR(ca->ca_id) == tcp->tcp_vendor &&
PCI_PRODUCT(ca->ca_id) == tcp->tcp_product)
@@ -226,7 +224,7 @@
}
printf(": %s Ethernet, pass %d.%d\n",
- tlp_cardbus_chip_names[sc->sc_chip],
+ tlp_chip_names[sc->sc_chip],
(sc->sc_rev >> 4) & 0xf, sc->sc_rev & 0xf);
/*
diff -r 1155c62e4623 -r a25e6a5a153f sys/dev/ic/tulip.c
--- a/sys/dev/ic/tulip.c Tue Jan 25 18:04:07 2000 +0000
+++ b/sys/dev/ic/tulip.c Tue Jan 25 19:29:17 2000 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: tulip.c,v 1.37 2000/01/25 03:14:12 thorpej Exp $ */
+/* $NetBSD: tulip.c,v 1.38 2000/01/25 19:29:17 thorpej Exp $ */
/*-
- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
+ * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -89,6 +89,8 @@
#include <dev/ic/tulipreg.h>
#include <dev/ic/tulipvar.h>
+const char *tlp_chip_names[] = TULIP_CHIP_NAMES;
+
/*
* The following tables compute the transmit threshold mode. We start
* at index 0. When ever we get a transmit underrun, we increment our
diff -r 1155c62e4623 -r a25e6a5a153f sys/dev/ic/tulipvar.h
--- a/sys/dev/ic/tulipvar.h Tue Jan 25 18:04:07 2000 +0000
+++ b/sys/dev/ic/tulipvar.h Tue Jan 25 19:29:17 2000 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: tulipvar.h,v 1.23 1999/12/12 02:41:51 thorpej Exp $ */
+/* $NetBSD: tulipvar.h,v 1.24 2000/01/25 19:29:17 thorpej Exp $ */
/*-
- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
+ * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -147,6 +147,7 @@
TULIP_CHIP_AL981 = 18, /* ADMtek AL981 */
TULIP_CHIP_AX88140 = 19, /* ASIX AX88140 */
TULIP_CHIP_AX88141 = 20, /* ASIX AX88141 */
+ TULIP_CHIP_X3201_3 = 21, /* Xircom X3201-3 */
} tulip_chip_t;
#define TULIP_CHIP_NAMES \
@@ -172,6 +173,7 @@
"ADMtek AL981", \
"ASIX AX88140", \
"ASIX AX88141", \
+ "Xircom X3201-3", \
}
struct tulip_softc;
@@ -487,6 +489,8 @@
#define TULIP_SP_FIELD(x, f) TULIP_SP_FIELD_C(((u_int16_t *)(x))[(f)])
#ifdef _KERNEL
+extern const char *tlp_chip_names[];
+
extern const struct tulip_mediasw tlp_21040_mediasw;
extern const struct tulip_mediasw tlp_21040_tp_mediasw;
extern const struct tulip_mediasw tlp_21040_auibnc_mediasw;
diff -r 1155c62e4623 -r a25e6a5a153f sys/dev/pci/if_tlp_pci.c
--- a/sys/dev/pci/if_tlp_pci.c Tue Jan 25 18:04:07 2000 +0000
+++ b/sys/dev/pci/if_tlp_pci.c Tue Jan 25 19:29:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tlp_pci.c,v 1.28 2000/01/25 03:23:56 thorpej Exp $ */
+/* $NetBSD: if_tlp_pci.c,v 1.29 2000/01/25 19:29:18 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -246,8 +246,6 @@
{ NULL, { 0, 0, 0 } }
};
-const char *tlp_pci_chip_names[] = TULIP_CHIP_NAMES;
-
int tlp_pci_shared_intr __P((void *));
const struct tulip_pci_product *tlp_pci_lookup
@@ -263,7 +261,7 @@
const struct tulip_pci_product *tpp;
for (tpp = tlp_pci_products;
- tlp_pci_chip_names[tpp->tpp_chip] != NULL;
+ tlp_chip_names[tpp->tpp_chip] != NULL;
tpp++) {
if (PCI_VENDOR(pa->pa_id) == tpp->tpp_vendor &&
PCI_PRODUCT(pa->pa_id) == tpp->tpp_product)
@@ -427,7 +425,7 @@
}
printf(": %s Ethernet, pass %d.%d\n",
- tlp_pci_chip_names[sc->sc_chip],
+ tlp_chip_names[sc->sc_chip],
(sc->sc_rev >> 4) & 0xf, sc->sc_rev & 0xf);
switch (sc->sc_chip) {
Home |
Main Index |
Thread Index |
Old Index