Add a chip type for the Xircom X3201-3, and centralize the declaration
of the chip names array.
This commit is contained in:
parent
3f72e2e3f9
commit
6aca67041c
@ -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 @@ const struct tulip_cardbus_product {
|
||||
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 @@ tlp_cardbus_lookup(ca)
|
||||
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 @@ tlp_cardbus_attach(parent, self, aux)
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
/*
|
||||
|
@ -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
|
||||
|
@ -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 @@ typedef enum {
|
||||
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 @@ typedef enum {
|
||||
"ADMtek AL981", \
|
||||
"ASIX AX88140", \
|
||||
"ASIX AX88141", \
|
||||
"Xircom X3201-3", \
|
||||
}
|
||||
|
||||
struct tulip_softc;
|
||||
@ -487,6 +489,8 @@ do { \
|
||||
#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;
|
||||
|
@ -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 @@ const struct tlp_pci_quirks tlp_pci_21142_quirks[] = {
|
||||
{ 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 @@ tlp_pci_lookup(pa)
|
||||
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 @@ tlp_pci_attach(parent, self, aux)
|
||||
}
|
||||
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user