[PATCH] powerpc: add of_get_mac_address() and update fsl_soc.c to use it

Segher Boessenkool segher at kernel.crashing.org
Fri Feb 16 07:47:28 EST 2007


>> +	return get_property(np, "address", NULL);
>
> Since there is so much room for confusion with "address", please at
> least do some basic sanity checking, like check that it's size is 6
> bytes and maybe that the multicast bit isn't set.

Preferably, don't use "address" at all -- there shouldn't
be any trees in the wild that use it.  If there actually
are some, the should use a quirk to change it to "local-
mac-address" instead.

This holds in general: workarounds for gross errors in
device trees should be applied much more selectively
than is done now, it just doesn't scale this way.


Segher




More information about the Linuxppc-dev mailing list