From: mcgrof@studorgs.rutgers.edu (Luis R. Rodriguez)
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Don Fry <brazilnut@us.ibm.com>, netdev@oss.sgi.com
Subject: Re: Ethernet MAC address question
Date: Tue, 15 Jun 2004 00:17:37 -0400 [thread overview]
Message-ID: <20040615041737.GF6253@ruslug.rutgers.edu> (raw)
In-Reply-To: <40CE361A.9060707@pobox.com>
On Mon, Jun 14, 2004 at 07:34:50PM -0400, Jeff Garzik wrote:
> Don Fry wrote:
> >When and/or why would an ethernet driver not use the MAC address from
> >the PROM associated with the adapter?
> >
> >Since the MAC address can be specified via "ifconfig ethN ether ...."
> >why not use the PROM value, and override it later if needed?
> >
> >I have received several complaints that the pcnet32 adapter is using
> >the 'wrong' MAC address. By looking back through older kernels, the
> >pcnet32 code was changed between November 2001 and February 2002 to
> >read the MAC address from PROM, but to use whatever value was read
> >from some volatile chip registers, which early chip versions do not
> >even initialize.
> >
> >It seems to me the driver should always use the PROM address, assuming
> >it has one. What am I missing?
>
> In general, you are correct.
>
> However there are a few cases where some magic platform means loads the
> MAC address into the (volatile) MAC address registers, and that's the
> only source of an accurate MAC address for those people.
>
> Jeff
In Prism54's case, since we need to first load a firmware to first obtain the MAC
address, there's a time period where the default mac address is set to a
temporary: 00:30:B4:00:00:00. This value was chosen by Jean (from HP).
He sent in a patch to do this and added the following comment:
/* Temporary dummy MAC address to use until firmware is loaded.
* The idea there is that some tools (such as nameif) may query
* the MAC address before the netdev is 'open'. By using a valid
* OUI prefix, they can process the netdev properly.
* Of course, this is not the final/real MAC address. It doesn't
* matter, as you are suppose to be able to change it anytime via
* ndev->set_mac_address. Jean II */
The real mac address will be populated currently if you modprobe prism54, the
firmware is loaded as a result and then there is a netdev open (ifconfig eth0 up).
There after the mac address is saved unless you rmmod the driver.
PS. A bit off topic but I'll soon send in a patch for review about loading
the firmware @ device probe Vs only at netdevice open time. This will
allow the mac address to always be correctly populated if the firmware
is present with the downside that you'll see a kernel message complaining it
didn't find the firmware if it was not found (to try to reload the firmware
all you would have to do is just try to bring the device up, so this is
not an issue for a built-in). I'll also shut the radio off at probe
though to not waste precious energy when on battery-powered laptops.
Luis
--
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E
next prev parent reply other threads:[~2004-06-15 4:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-14 22:02 Ethernet MAC address question Don Fry
2004-06-14 23:34 ` Jeff Garzik
2004-06-15 4:17 ` Luis R. Rodriguez [this message]
2004-06-15 9:58 ` Mark Brown
2004-06-15 15:38 ` Don Fry
2004-06-15 16:11 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040615041737.GF6253@ruslug.rutgers.edu \
--to=mcgrof@studorgs.rutgers.edu \
--cc=brazilnut@us.ibm.com \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).