[U-Boot] [PATCH 01/27 v2] Blackfin: bfin_mac: force board_get_enetaddr() usage

Ben Warren biggerbadderben at gmail.com
Wed Feb 11 06:45:05 CET 2009


Mike Frysinger wrote:
> On Tuesday 03 February 2009 14:40:00 Mike Frysinger wrote:
>   
>> i think we can agree that this does not scale at all.  if, however, we
>> change the global data to something like:
>> typedef struct bd_info {
>> 	...
>> #ifdef CONFIG_NET_MULTI
>> 	uchar bi_enetXaddr[CONFIG_NET_MULTI_MAX][6];
>> # define bi_enetaddr bi_enetXaddr[0]
>> #else
>> 	uchar bi_enetaddr[6];
>> #endif
>> 	...
>> };
>>     
>
> Ben: does this sound reasonable ?  if so, i can start a patch series moving in 
> this direction ...
> -mike
>   
Thanks for tackling this cluster$%@#.  I'm not crazy about the 
CONFIG_NET_MULTI_MAX, but then I'm not really sure why the ethernet 
addresses exist in global data on boards with CONFIG_NET_MULTI.  The net 
library doesn't use them, most (maybe all?) of the drivers don't look at 
it.  Some common code does, but does it need to?  Maybe it's needed to 
pass to some operating systems?  This is an example of something that 
could use some serious refactoring, but I expect it's an onion with 
many, many layers.  OTOH, if you're going to change the name of a 
variable in global data, you'll find out really fast where it's used.  
Maybe we can gut it completely?  I'm lacking in historical perspective 
and my world view is pretty limited, so hopefully others (read WD) will 
chime in.

regards,
Ben


More information about the U-Boot mailing list