From owner-freebsd-net@FreeBSD.ORG Sat Jun 30 09:01:23 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B3EC16A400 for ; Sat, 30 Jun 2007 09:01:23 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by mx1.freebsd.org (Postfix) with ESMTP id 2A2F513C447 for ; Sat, 30 Jun 2007 09:01:23 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by wa-out-1112.google.com with SMTP id j37so1519929waf for ; Sat, 30 Jun 2007 02:01:22 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=qUeQN6V/2OilRUZ4zoDN1HAKO7ptxUkyJFf3vzfFuxyaO5fxoJE6y0y64zCiZiioqvfWvJGmvTGZGFv+WZnBhojXCF4WhatWoX8s1N0n7Qg/ljOcUyF+EwTkHV0URqBNHcPLdocsuqL40zkh3vuNirepjYzsLz4tK2sHNEJi5Uo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=N7h6dEQbI69nWwhWhCDDZsMYK22jZzXH9JDDZFWJRshYcboUBRPfD6HMMu+IvdbSPv7gOP0YbRCj8FW+10+j5zNns4q2liwARgPBI7KEz7LTwyd4Zo+xWHawd3I6S9Jj9gPRc9bjMdxjKXuhRUVY9U9ToqRI9addE9u9NwCUAXw= Received: by 10.115.111.1 with SMTP id o1mr3334320wam.1183194082610; Sat, 30 Jun 2007 02:01:22 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTP id m40sm10828448waf.2007.06.30.02.01.20 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 30 Jun 2007 02:01:21 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id l5U91Gkd058668 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Jun 2007 18:01:16 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id l5U91F2B058667; Sat, 30 Jun 2007 18:01:15 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Sat, 30 Jun 2007 18:01:15 +0900 From: Pyun YongHyeon To: W Forms Message-ID: <20070630090115.GA56970@cdnetworks.co.kr> References: <200706292020.l5TKK8aL041447@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline In-Reply-To: <200706292020.l5TKK8aL041447@freefall.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: freebsd-net@FreeBSD.org, bug-followup@FreeBSD.org Subject: Re: kern/112710: [re] if_re driver detects incorrect b243a405a405 MAC address on SMC9452TX-1 pci gigabit cards X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2007 09:01:23 -0000 --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > To: bug-followup@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 --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="re.eeprom.patch" 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 --45Z9DzgjV8m4Oswq--