[PATCH] powerpc: fix MAC address entries for 83xx, 85xx, and 86xx device trees

Segher Boessenkool segher at kernel.crashing.org
Wed Jun 27 01:42:51 EST 2007


>> Yeah, that's fine.   I just meant the current kernel (before
>> .25) could detect you are using a uboot that won't work after
>> .25 anymore, and shout at the user.  Would save you some bug
>> reports ;-)
>
> I don't think that's possible.

Hrm I phrased it incorrectly I suppose, I meant something just
like the patch you propose below :-)

> Unfortunately, I don't see how I can fix these problems.

You cannot fix it but you can sometimes detect it.  Not all
that important anyway.

>>> In other words, the current U-Boot and Linux code is written to not 
>>> care what the other one does.  I have no plans to remove the code in 
>>> the kernel that looks for obsolete entries (I'm talking about 
>>> function of_get_mac_address), because it's "safe".
>> Well you should remove the "address" thing, it is _not_ safe.
>
> Checking for 'address' after finding no match on 'mac-address' and 
> 'local-mac-address' is safe, because if that's the only property that 
> has a valid MAC address, I want to use it.  As long as there are 
> people out there using U-Boot 1.1.x, we'll need to keep that code 
> around.

It is not safe since you might happen upon a network device without
"mac-address" property (since the device hasn't been used at boot in
a real OF, or the firmware knows no mac address at all, etc.) and no
"local-mac-address" either -- but it _does_ have an "address", and
it can have an "address" with the correct semantics, not the broken
stuff.

It's not very likely for this happens, sure :-)

>>> However, now that you mention it, I could update function 
>>> of_get_mac_address() to display a warning if it only finds the 
>>> 'address' property.
>> Yeah exactly.
>
> Ok, I will submit a patch to do that.

Thanks!


Segher




More information about the Linuxppc-dev mailing list