kern/112710: [re] if_re driver detects incorrect b243a405a405
MAC address on SMC9452TX-1 pci gigabit cards
Pyun YongHyeon
pyunyh at gmail.com
Sat Jun 30 09:01:23 UTC 2007
On Fri, Jun 29, 2007 at 08:20:08PM +0000, W Forms wrote:
> The following reply was made to PR kern/112710; it has been noted by GNATS.
>
> From: W Forms <wforms at safe-mail.net>
> To: bug-followup at FreeBSD.org
> Cc:
> Subject: Re: kern/112710: [re] if_re driver detects incorrect b243a405a405 MAC address on SMC9452TX-1 pci gigabit cards
> Date: Fri, 29 Jun 2007 22:16:23 +0200
>
> Today I run a test using the "NetBSD Live! 2007" live-CD, which is
> apparently based on NetBSD 4.0 BETA.
> NetBSD also uses the re driver for these cards. Upon boot all the "5
> bad cards" are detected as RealTek 8169SB gigabit adapters and
> believe or not, each and every single adapter uses its own correct
> MAC address.
> SO whatever the problem is in the FreeBSD and OpenBSD re driver, the
> NetBSD guys have already solved it. Or, they didn't scew it up in the
> first place! :-)
> Either way, it might be worthwile talking to them about this defect
> or having a thorough look at their re driver code (or the code of any
> related networking module).
> I also run a test with a Gentoo Linux Live CD which also uses the
> correct MAC addresses.
> Unfortunately this is where my abilities stop.
>
> Somebody, Please!
> You don't have to reinvent the solution, NetBSD already/still has the
> answer.
>
How about attached patch?
--
Regards,
Pyun YongHyeon
-------------- next part --------------
Index: if_re.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/re/if_re.c,v
retrieving revision 1.90
diff -u -r1.90 if_re.c
--- if_re.c 16 Jun 2007 02:54:19 -0000 1.90
+++ if_re.c 30 Jun 2007 08:58:13 -0000
@@ -1211,10 +1211,10 @@
hw_rev++;
}
- sc->rl_eewidth = 6;
+ sc->rl_eewidth = RL_9356_ADDR_LEN;
re_read_eeprom(sc, (caddr_t)&re_did, 0, 1);
if (re_did != 0x8129)
- sc->rl_eewidth = 8;
+ sc->rl_eewidth = RL_9346_ADDR_LEN;
/*
* Get station address from the EEPROM.
Index: ../../pci/if_rlreg.h
===================================================================
RCS file: /home/ncvs/src/sys/pci/if_rlreg.h,v
retrieving revision 1.65
diff -u -r1.65 if_rlreg.h
--- ../../pci/if_rlreg.h 18 Apr 2007 00:40:43 -0000 1.65
+++ ../../pci/if_rlreg.h 30 Jun 2007 08:58:13 -0000
@@ -312,6 +312,8 @@
#define RL_EEMODE_WRITECFG (0x80|0x40)
/* 9346 EEPROM commands */
+#define RL_9346_ADDR_LEN 6 /* 93C46 1K: 128x16 */
+#define RL_9356_ADDR_LEN 8 /* 93C56 2K: 256x16 */
#define RL_9346_WRITE 0x5
#define RL_9346_READ 0x6
More information about the freebsd-net
mailing list