mac-address vs. local-mac-address
Kumar Gala
galak at kernel.crashing.org
Thu Feb 8 08:41:02 EST 2007
On Feb 7, 2007, at 3:32 PM, Benjamin Herrenschmidt wrote:
> On Wed, 2007-02-07 at 15:17 -0600, Timur Tabi wrote:
>> Hi everyone,
>>
>> What is the current consensus on using mac-address vs. local-mac-
>> address in the
>> device tree? The 1275 spec says this:
>>
>> "local-mac-address" Standard property name to specify preassigned
>> network address.
>> "mac-address" Standard property name to specify network address
>> last used.
>>
>> I think we need to agree on some interpretation of these
>> statements, and all the
>> code should be updated to implement that interpretation.
>
> It's fairly clear:
>
> local-mac-address is what is statically set by the firwmare (comes
> from
> EEPROM, whatever).
>
> mac-address is really only meaningful if your firmware is
> "dynamic" (real OF, uboot maybe) and was, for some reason,
> instructed by
> the user to use a different mac address for that boot (if that feature
> exist).
>
> It's basically the mac-address that was actually used on that
> interface
> to netboot the kernel I'd say.
Which means the code in fsl_soc.c is wrong in how it handles the
precedence of gianfar:
mac_addr = get_property(np, "local-mac-address", NULL);
if (mac_addr == NULL)
mac_addr = get_property(np, "mac-address",
NULL);
if (mac_addr == NULL) {
/* Obsolete */
mac_addr = get_property(np, "address", NULL);
}
should really be:
mac_addr = get_property(np, "mac-address", NULL);
if (mac_addr == NULL)
mac_addr = get_property(np, "local-mac-
address", NULL);
if (mac_addr == NULL) {
/* Obsolete */
mac_addr = get_property(np, "address", NULL);
}
- k
More information about the Linuxppc-dev
mailing list