Subject: Patch for EN2216 PCMCIA Ethernet-card
To: None <port-i386@netbsd.org>
From: Benjamin Gerfelder <benjamin@dante.saar.de>
List: port-i386
Date: 10/25/1998 02:38:04
Hi,
I finally got my Accton EN2216 network card working, but I had to patch the
kernel because the pcmcia-driver was unable to read the correct
ethernet address off my card. Anyway, here`s my patch, it seems to be stable
but I haven`t had enough time for extensive testing yet...
*** ./orig/if_ne_pcmcia.c Sun Oct 25 18:16:22 1998
--- if_ne_pcmcia.c Sun Oct 25 18:16:22 1998
***************
*** 52,57 ****
--- 52,60 ----
#include <dev/ic/ne2000reg.h>
#include <dev/ic/ne2000var.h>
+ /* define this if your card is broken */
+ #define BROKEN_CARD_PCMCIA_ETHERNET
+
#ifdef __BROKEN_INDIRECT_CONFIG
int ne_pcmcia_match __P((struct device *, void *, void *));
#else
***************
*** 113,118 ****
--- 116,125 ----
PCMCIA_MANUFACTURER_INVALID, PCMCIA_PRODUCT_INVALID,
"D-Link", "DE-650", 0,
0x0040, { 0x00, 0x80, 0xc8 } },
+ { "Accton EN2216 PCMCIA-Ethernet",
+ /* This card seems to be broken, define BROKEN_CARD above */
+ 0x1bf, 0x2216, "ACCTON", "EN2216-PCMCIA-ETHERNET", 0,
+ 0x0ff0, { 0x00, 0x00, 0xe8 } },
#if 0
/* the rest of these are stolen from the linux pcnet pcmcia device
driver. Since I don't know the manfid or cis info strings for
***************
*** 398,404 ****
--- 405,417 ----
ne_dev->enet_vendor[0],
ne_dev->enet_vendor[1],
ne_dev->enet_vendor[2]);
+ #ifndef BROKEN_CARD_PCMCIA_ETHERNET
return;
+ #endif
+ #ifdef BROKEN_CARD_PCMCIA_ETHERNET
+ printf("\n%s: warning!",dsc->sc_dev.dv_xname);
+ printf("\n%s: using incorrect ethernet address.\n",dsc->sc_dev.dv_xname);
+ #endif
}
}
Mfg
Benjamin
--
"Ein _funktionierendes_ Netz aus 1500 NT-Buechsen siedle ich bei den
Gebruedern Grimm an."
Jens Dittmar in d.c.o.u.l.m