From owner-freebsd-current Thu Dec 19 20: 8: 9 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBF6B37B401 for ; Thu, 19 Dec 2002 20:08:07 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 438F943EEA for ; Thu, 19 Dec 2002 20:08:07 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.6/8.12.6) id gBK47rlj078613; Thu, 19 Dec 2002 22:07:53 -0600 (CST) (envelope-from dan) Date: Thu, 19 Dec 2002 22:07:53 -0600 From: Dan Nelson To: User Phrackbox Cc: current@FreeBSD.ORG Subject: Re: if_dc: ethernet address now reported as 00:00:00:00:00:00 Message-ID: <20021220040753.GF94862@dan.emsphone.com> References: <20021220002849.GA27476@ip68-100-111-63.nv.nv.cox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021220002849.GA27476@ip68-100-111-63.nv.nv.cox.net> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Dec 19), User Phrackbox said: > I have been recently experimenting with FreeBSD-current and have > noticed a bug in dc network driver that it doesn't set the ethernet > address correctly (I have seen this problem reported before on > current, but I was hoping it could be fixed before 5.0-release). I am > trying to find a fix myself but I am still getting comfortable with > sources. Here is my dmesg output. > > dc0: port 0xe000-0xe0ff mem 0xef005000-0xef0050ff irq 10 at device 9.0 on pci0 > dc0: Ethernet address: 00:00:00:00:00:00 > miibus0: on dc0 > dcphy0: on miibus0 > dcphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Ooh. you get an all-zero address. Mine comes up with dc0: port 0xa800-0xa8ff mem 0xf3000000-0xf30000ff irq 11 at device 12.0 on pci0 dc0: Ethernet address: c0:00:c0:00:c0:00 miibus0: on dc0 ukphy0: on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto I actually like mine; it makes it easy to spot my packets on tcpdumps :) It looks like the MAC address is stored in a different place on each brand of card, so it's not surprising that the driver gets it wrong sometimes. Take a look at if_dc.c:2131-2172 to see what I mean. Try using dc_read_eeprom in a loop to print the first 512 or bytes, then determine the true offset by searching for your MAC address in there (it's usually stamped or printed on the card somewhere). -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message