Hi Mike,

Mike Frysinger wrote:
> <snip>
>>> not specific to either of these drivers, so if we did choose to make this
>>> behavior optional via some define, it would make more sense to do it in
>>> the common eth code rather than copying & pasting it everywhere.
>>>       
>> Agreed.  Do you think you have time and resources to craft such a patch?
>>     
>
> net/eth.c:eth_initialize() already has the logic to handle this, but that 
> only 
> applies to NET_MULTI drivers.  and most do not take advantage of it.  i think 
> the documentation should be updated like so:
>       in the driver function that calls eth_register(), the driver should
>       initialize dev->enetaddr to the MAC found in the hardware (if possible)
> and then applicable drivers should be fixed.  if we agree on this route, i 
> can 
> do a quick scan of the net drivers and post relevant patches.
>
>   
That'd be great.  You've done good work bringing consistency to the code. 
> in the case of a mismatch, we would see from the common eth code:
> Warning: Blackfin EMAC MAC addresses don't match:
> Address in SROM is         0a:0a:0a:0a:0a:0a
> Address in environment is  00:e0:22:fe:44:ec
>
>   
> the smsc drivers however are not in the NET_MULTI category -- they dont use 
> any of the common ethernet stack.  so once they are converted to NET_MULTI, 
> they'll get this functionality for free (when exactly were we adding #warning 
> about non-NET_MULTI usage ?).  so rather than expend effort on restoring 
> duplicate code, how about interested parties convert the driver ;).
> -mike
>   
The #warning patch is done but not submitted.  Pretty lame, I know, but 
it's been a crazy summer.  I have the SMSC driver mostly ported but 
don't have any hardware to test on.  I guess there are 3 days left in 
this merge window to get the ball rolling...  If anybody else has 
already done this, please submit.

regards,
Ben
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to