From nobody@FreeBSD.org  Sun Jul 21 07:02:21 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 422DC37B400
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 21 Jul 2002 07:02:21 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0736A43E31
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 21 Jul 2002 07:02:21 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g6LE2KOT015155
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 21 Jul 2002 07:02:20 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.4/8.12.4/Submit) id g6LE2Ktb015154;
	Sun, 21 Jul 2002 07:02:20 -0700 (PDT)
Message-Id: <200207211402.g6LE2Ktb015154@www.freebsd.org>
Date: Sun, 21 Jul 2002 07:02:20 -0700 (PDT)
From: Marcel Prisi <marcel@virtua.ch>
To: freebsd-gnats-submit@FreeBSD.org
Subject: SMC EN5251BE ethernet chipset gets incorrect MAC address throuch dc driver
X-Send-Pr-Version: www-1.0

>Number:         40837
>Category:       misc
>Synopsis:       SMC EN5251BE ethernet chipset gets incorrect MAC address throuch dc driver
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mbr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 21 07:10:01 PDT 2002
>Closed-Date:    Wed Feb 12 14:59:59 PST 2003
>Last-Modified:  Wed Feb 12 14:59:59 PST 2003
>Originator:     Marcel Prisi
>Release:        4.6
>Organization:
Virtua SRL
>Environment:
FreeBSD jolabraise.aubonne.virtua.ch 4.6-RELEASE FreeBSD 4.6-RELEASE #0: Tue Jun 11 06:14:12 GMT 2002     murray@builder.freebsdmall.com:/usr/src/sys/compile/GENERIC  i386
>Description:
When using an SMC ethernet card based on the SMC EN5251BE chipset, the kernel dc driver discovers a wrong mac address, 08:00:08:00:08:00. The cards seems to work correctly, but of course, you can not use more than one of these cards on the same physical network.

dmesg output :
dc0: <Accton EN2242 MiniPCI 10/100BaseTX> port 0x6500-0x65ff mem 0xe4010000-0xe40103ff irq 9 at device 8.0 on pci0
>How-To-Repeat:
Just plug-in the SMC card and ifconfig.
>Fix:
      
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: jon 
State-Changed-When: Mon Aug 12 13:09:38 PDT 2002 
State-Changed-Why:  

Please send the relevant lines from the output of "pciconf -l -v". 

Also, you may wish to try the patch in pr: kern/35482 


http://www.freebsd.org/cgi/query-pr.cgi?pr=40837 

From: Marcel Prisi <marcel@virtua.ch>
To: freebsd-gnats-submit@FreeBSD.org, marcel@virtua.ch
Cc:  
Subject: Re: misc/40837: SMC EN5251BE ethernet chipset gets incorrect MAC address throuch dc driver
Date: Thu, 15 Aug 2002 15:42:47 +0200

 Here's what I get :
 
 dc0@pci0:15:0:  class=3D0x020000 card=3D0x125510b8 chip=3D0x12161113 rev=3D=
 0x11
 hdr=3D0x00
     vendor   =3D 'Accton Technology Corporation'
     device   =3D 'EN5251-Based Fast Ethernet Adapter'
     class    =3D network
     subclass =3D ethernet

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.
 
 
 
 
Responsible-Changed-From-To: freebsd-bugs->mbr 
Responsible-Changed-By: mbr 
Responsible-Changed-When: Thu Jan 30 15:46:40 PST 2003 
Responsible-Changed-Why:  
I'll look at this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40837 
State-Changed-From-To: analyzed->closed 
State-Changed-By: mbr 
State-Changed-When: Wed Feb 12 14:58:49 PST 2003 
State-Changed-Why:  
Close this PR. Submitter has now his card working. The fix 
will be part of 4.8-Release. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40837 
>Unformatted:
