Date: Thu, 15 Aug 2002 07:40:04 -0700 (PDT) From: Marcel Prisi <marcel@virtua.ch> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/40837: SMC EN5251BE ethernet chipset gets incorrect MAC address throuch dc driver Message-ID: <200208151440.g7FEe4Ul042464@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/40837; it has been noted by GNATS.
From: Marcel Prisi <marcel@virtua.ch>
To: freebsd-gnats-submit@FreeBSD.org
Cc: jon@FreeBSD.org
Subject: Re: misc/40837: SMC EN5251BE ethernet chipset gets incorrect MAC address throuch dc driver
Date: Thu, 15 Aug 2002 16:36:28 +0200
I adapted Ted Stockwell's kern/35482 to FreeBSD-4.6.2, and it seems to wo=
rk=20
perfectly well.
Here are the diffs :
--- if_dc.c.orig Tue Feb 26 05:21:30 2002
+++ if_dc.c Thu Aug 15 16:11:17 2002
@@ -183,6 +183,8 @@
"Accton EN1217 10/100BaseTX" },
{ DC_VENDORID_ACCTON, DC_DEVICEID_EN2242,
"Accton EN2242 MiniPCI 10/100BaseTX" },
+ { DC_VENDORID_ACCTON, DC_DEVICEID_EN5251B,
+ "Accton EN5251-Based 10/100BaseTX" },
{ DC_VENDORID_CONEXANT, DC_DEVICEID_RS7112,
"Conexant LANfinity MiniPCI 10/100BaseTX" },
{ 0, 0, NULL }
@@ -1438,6 +1440,9 @@
if (t->dc_did =3D=3D DC_DEVICEID_DM9102 &&
rev >=3D DC_REVISION_DM9102A)
t++;
+ if (t->dc_did =3D=3D DC_DEVICEID_EN2242 &&
+ rev >=3D DC_REVISION_EN5251B)
+ t++;
return(t);
}
t++;
@@ -1774,12 +1779,16 @@
sc->dc_pmode =3D DC_PMODE_MII;
break;
case DC_DEVICEID_AN985:
- case DC_DEVICEID_EN2242:
- sc->dc_type =3D DC_TYPE_AN985;
- sc->dc_flags |=3D DC_TX_USE_TX_INTR;
- sc->dc_flags |=3D DC_TX_ADMTEK_WAR;
- sc->dc_pmode =3D DC_PMODE_MII;
- break;
+ case DC_DEVICEID_EN2242: /* and DC_DEVICEID_EN5251B: */
+ if (revision < DC_REVISION_EN5251B) {
+ sc->dc_type =3D DC_TYPE_AN985;
+ } else {
+ sc->dc_type =3D DC_TYPE_EN5152B;
+ }
+ sc->dc_flags |=3D DC_TX_USE_TX_INTR;
+ sc->dc_flags |=3D DC_TX_ADMTEK_WAR;
+ sc->dc_pmode =3D DC_PMODE_MII;
+ break;
case DC_DEVICEID_98713:
case DC_DEVICEID_98713_CP:
if (revision < DC_REVISION_98713A) {
@@ -1901,6 +1910,7 @@
break;
case DC_TYPE_AL981:
case DC_TYPE_AN985:
+ case DC_TYPE_EN5152B:
dc_read_eeprom(sc, (caddr_t)&eaddr, DC_AL_EE_NODEADDR, 3,=
0);
break;
case DC_TYPE_CONEXANT:
--- if_dcreg.h.orig Tue Feb 26 05:21:30 2002
+++ if_dcreg.h Thu Aug 15 16:16:21 2002
@@ -76,6 +76,7 @@
#define DC_TYPE_PNICII 0x9 /* 82c115 PNIC II */
#define DC_TYPE_PNIC 0xA /* 82c168/82c169 PNIC I */
#define DC_TYPE_CONEXANT 0xC /* Conexant LANfinity RS7112 */
+#define DC_TYPE_EN5152B 0xD /* Accton EN5251B. Clone =
of=20
ADMtek 983B? */
#define DC_IS_MACRONIX(x) \
(x->dc_type =3D=3D DC_TYPE_98713 || \
@@ -84,6 +85,7 @@
#define DC_IS_ADMTEK(x) \
(x->dc_type =3D=3D DC_TYPE_AL981 || \
+ x->dc_type =3D=3D DC_TYPE_EN5152B || \
x->dc_type =3D=3D DC_TYPE_AN985)
#define DC_IS_INTEL(x) (x->dc_type =3D=3D DC_TYPE_21143)
@@ -855,6 +857,14 @@
*/
#define DC_DEVICEID_EN1217 0x1217
#define DC_DEVICEID_EN2242 0x1216
+#define DC_DEVICEID_EN5251B 0x1216
+
+ /*
+ * The Accton EN5251B is sold as the Siemens Speedstream SS1020 and
+ * as SMC EN5251BE.
+ * The EN5251B seems to be a clone of the ADMtek 983 or 983B
+ */
+#define DC_REVISION_EN5251B 0x11 /* ASSUMING that EN2242's revision=20
differs */
/*
* Conexant vendor ID.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208151440.g7FEe4Ul042464>
