Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Dec 2002 22:07:53 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        User Phrackbox <fluxbox@cox.net>
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>
In-Reply-To: <20021220002849.GA27476@ip68-100-111-63.nv.nv.cox.net>
References:  <20021220002849.GA27476@ip68-100-111-63.nv.nv.cox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <Macronix 98715AEC-C 10/100BaseTX> port 0xe000-0xe0ff mem 0xef005000-0xef0050ff irq 10 at device 9.0 on pci0
> dc0: Ethernet address: 00:00:00:00:00:00
> miibus0: <MII bus> on dc0
> dcphy0: <Intel 21143 NWAY media interface> on miibus0
> dcphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

Ooh.  you get an all-zero address.  Mine comes up with

dc0: <Davicom DM9102A 10/100BaseTX> port 0xa800-0xa8ff mem 0xf3000000-0xf30000ff irq 11 at device 12.0 on pci0
dc0: Ethernet address: c0:00:c0:00:c0:00
miibus0: <MII bus> on dc0
ukphy0: <Generic IEEE 802.3u media interface> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021220040753.GF94862>