Add support for the Macintosh LC Ethernet Adapter, from Ken'ichi Ishizaka.

This was erroneously recognized as an 8390-based card, where in fact it is
using the 83932 (SONIC) controller.
This commit is contained in:
scottr 1999-09-29 06:04:50 +00:00
parent 54fd3dd508
commit 8e9fd55168
3 changed files with 44 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_snvar.h,v 1.13 1998/12/22 08:47:05 scottr Exp $ */
/* $NetBSD: if_snvar.h,v 1.14 1999/09/29 06:04:50 scottr Exp $ */
/*
* Copyright (c) 1991 Algorithmics Ltd (http://www.algor.co.uk)
@ -17,6 +17,7 @@
#define SN_VENDOR_APPLE 0x00 /* Apple Computer/compatible */
#define SN_VENDOR_DAYNA 0x01 /* Dayna/Kinetics EtherPort */
#define SN_VENDOR_APPLE16 0x02 /* Apple Twisted Pair NB */
#define SN_VENDOR_ASANTELC 0x09 /* Asante Macintosh LC Ethernet */
/*
* Memory access macros. Since we handle SONIC in 16 bit mode (PB5X0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ae_nubus.c,v 1.28 1998/09/27 14:39:11 scottr Exp $ */
/* $NetBSD: if_ae_nubus.c,v 1.29 1999/09/29 06:04:51 scottr Exp $ */
/*
* Copyright (C) 1997 Scott Reynolds
@ -418,6 +418,11 @@ ae_nb_card_vendor(bst, bsh, na)
}
break;
case NUBUS_DRSW_APPLE:
if (na->drhw == NUBUS_DRHW_ASANTE_LC) {
vendor = DP8390_VENDOR_UNKNOWN;
break;
}
/* FALLTHROUGH */
case NUBUS_DRSW_DAYNA2:
case NUBUS_DRSW_TECHWORKS:
case NUBUS_DRSW_TFLLAN:

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sn_nubus.c,v 1.19 1998/07/05 00:51:10 jonathan Exp $ */
/* $NetBSD: if_sn_nubus.c,v 1.20 1999/09/29 06:04:51 scottr Exp $ */
/*
* Copyright (C) 1997 Allen Briggs
@ -91,6 +91,7 @@ sn_nubus_match(parent, cf, aux)
case SN_VENDOR_APPLE:
case SN_VENDOR_APPLE16:
case SN_VENDOR_ASANTELC:
case SN_VENDOR_DAYNA:
rv = 1;
break;
@ -116,6 +117,7 @@ sn_nubus_attach(parent, self, aux)
bus_space_tag_t bst;
bus_space_handle_t bsh, tmp_bsh;
u_int8_t myaddr[ETHER_ADDR_LEN];
char *cardtype;
(void)(&offset); /* Work around lame gcc initialization bug */
@ -127,6 +129,8 @@ sn_nubus_attach(parent, self, aux)
sc->sc_regt = bst;
cardtype = nubus_get_card_name(bst, bsh, na->fmt);
success = 0;
sc->slotno = na->slot;
@ -204,6 +208,30 @@ sn_nubus_attach(parent, self, aux)
success = 1;
break;
case SN_VENDOR_ASANTELC: /* Macintosh LC Ethernet Adapter */
sc->snr_dcr = DCR_ASYNC | DCR_WAIT0 |
DCR_DMABLOCK | DCR_PO1 | DCR_RFT16 | DCR_TFT16;
sc->snr_dcr2 = 0;
sc->bitmode = 0; /* 16 bit card */
if (bus_space_subregion(bst, bsh,
0x0, SN_REGSIZE, &sc->sc_regh)) {
printf(": failed to map register space.\n");
break;
}
if (bus_space_subregion(bst, bsh,
0x400000, ETHER_ADDR_LEN, &tmp_bsh)) {
printf(": failed to map ROM space.\n");
break;
}
sn_get_enaddr(bst, tmp_bsh, 0, myaddr);
offset = 0;
success = 1;
break;
default:
/*
* You can't actually get this default, the snmatch
@ -228,6 +256,8 @@ sn_nubus_attach(parent, self, aux)
sc->sc_reg_map[i] = (bus_size_t)((i * 4) + offset);
}
printf(": %s\n", cardtype);
/* snsetup returns 1 if something fails */
if (snsetup(sc, myaddr)) {
bus_space_unmap(bst, bsh, NBMEMSIZE);
@ -255,6 +285,11 @@ sn_nb_card_vendor(bst, bsh, na)
vendor = SN_VENDOR_APPLE16;
break;
case NUBUS_DRSW_APPLE:
if (na->drhw == NUBUS_DRHW_ASANTE_LC)
vendor = SN_VENDOR_ASANTELC;
else
vendor = SN_VENDOR_APPLE;
break;
case NUBUS_DRSW_TECHWORKS:
vendor = SN_VENDOR_APPLE;
break;