Support Planex Communications Inc, FNW-3600-T.

This commit is contained in:
enami 1999-09-27 23:19:12 +00:00
parent 70c01ac44a
commit bb03434a5f
4 changed files with 50 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dp8390.c,v 1.26 1999/08/25 22:41:42 thorpej Exp $ */
/* $NetBSD: dp8390.c,v 1.27 1999/09/27 23:19:12 enami Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@ -100,8 +100,10 @@ dp8390_config(sc, media, nmedia, defmedia)
if ((sc->mem_size < 16384) ||
(sc->sc_flags & DP8390_NO_MULTI_BUFFERING))
sc->txb_cnt = 1;
else
else if (sc->mem_size < 8192 * 3)
sc->txb_cnt = 2;
else
sc->txb_cnt = 3;
sc->tx_page_start = sc->mem_start >> ED_PAGE_SHIFT;
sc->rec_page_start = sc->tx_page_start + sc->txb_cnt * ED_TXBUF_SIZE;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ne2000.c,v 1.22 1999/09/27 05:25:44 enami Exp $ */
/* $NetBSD: ne2000.c,v 1.23 1999/09/27 23:19:12 enami Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -149,9 +149,20 @@ ne2000_attach(nsc, myea, media, nmedia, defmedia)
dsc->sc_reg_map[i] = i;
/*
* 8k of memory plus an additional 8k if an NE2000.
* 8k of memory for NE1000, 16k for NE2000 and 24k for the
* card uses DL10019.
*/
memsize = 8192 + (nsc->sc_type == NE2000_TYPE_NE2000 ? 8192 : 0);
switch (nsc->sc_type) {
case NE2000_TYPE_NE1000:
memsize = 8192;
break;
case NE2000_TYPE_NE2000:
memsize = 8192 * 2;
break;
case NE2000_TYPE_DL10019:
memsize = 8192 * 3;
break;
}
/*
* NIC memory doens't start at zero on an NE board.

View File

@ -1,4 +1,4 @@
/* $NetBSD: ne2000var.h,v 1.5 1999/09/27 05:25:44 enami Exp $ */
/* $NetBSD: ne2000var.h,v 1.6 1999/09/27 23:19:13 enami Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -52,8 +52,11 @@ struct ne2000_softc {
/* sc_type */
#define NE2000_TYPE_NE1000 1
#define NE2000_TYPE_NE2000 2
#define NE2000_TYPE_DL10019 3
#define NE2000_USE_WORD(sc) (((sc)->sc_type) == NE2000_TYPE_NE2000)
#define NE2000_USE_WORD(sc) \
(((sc)->sc_type == NE2000_TYPE_NE2000) || \
((sc)->sc_type == NE2000_TYPE_DL10019))
void ne2000_attach __P((struct ne2000_softc *, u_int8_t *,
int *, int, int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ne_pcmcia.c,v 1.38 1999/09/25 09:47:13 enami Exp $ */
/* $NetBSD: if_ne_pcmcia.c,v 1.39 1999/09/27 23:19:14 enami Exp $ */
/*
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
@ -87,6 +87,8 @@ struct ne2000dev {
int function;
int enet_maddr;
unsigned char enet_vendor[3];
int flags;
#define NE2000DVF_DL10019 0x0001 /* chip is D-Link DL10019 */
} ne2000devs[] = {
{ PCMCIA_STR_AMBICOM_AMB8002T,
PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID,
@ -133,6 +135,11 @@ struct ne2000dev {
PCMCIA_CIS_SVEC_LANCARD,
0, 0x7f0, { 0x00, 0xc0, 0x6c } },
{ PCMCIA_STR_PLANEX_FNW3600T,
PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID,
PCMCIA_CIS_PLANEX_FNW3600T,
0, -1, { 0x00, 0x90, 0xcc }, NE2000DVF_DL10019 },
/*
* You have to add new entries which contains
* PCMCIA_VENDOR_INVALID and/or PCMCIA_PRODUCT_INVALID
@ -372,6 +379,7 @@ ne_pcmcia_attach(parent, self, aux)
int *, int *));
int *media, nmedia, defmedia;
const char *typestr = "";
u_int8_t sum;
npp_init_media = NULL;
media = NULL;
@ -497,6 +505,24 @@ ne_pcmcia_attach(parent, self, aux)
}
}
if ((ne_dev->flags & NE2000DVF_DL10019) != 0) {
#define PAR0 0x04
for (i = 0, sum = 0; i < 8; i++)
sum += bus_space_read_1(nsc->sc_asict, nsc->sc_asich,
PAR0 + i);
if (sum != 0xff) {
printf("%s: sum(0x%x) should be 0xff\n",
dsc->sc_dev.dv_xname, sum);
return;
}
for (i = 0; i < ETHER_ADDR_LEN; i++)
myea[i] = bus_space_read_1(nsc->sc_asict,
nsc->sc_asich, PAR0 + i);
enaddr = myea;
nsc->sc_type = NE2000_TYPE_DL10019;
#undef PAR0
}
if (enaddr != NULL) {
/*
* Make sure this is what we expect.