Wolfgang,

On 3/30/2010 1:34 PM, Wolfgang Denk wrote:
> Dear Heiko Schocher,
>
> In message<4bb238e9.7060...@denx.de>  you wrote:
>    
>> if ethaddr is not setup in the environment, fill the device
>> enetaddr with the contents of the eeprom, and only
>> the device enetaddr, not the mac address registers!
>>
>> Tested on the magnesium board.
>>
>> Signed-off-by: Heiko Schocher<h...@denx.de>
>> ---
>> - changes since v1 posted here:
>>    http://lists.denx.de/pipermail/u-boot/2010-March/069192.html
>>
>>    - splitted in two patches as Wolfgang suggested
>>      
> Thanks.  Note that it would also have been an excellent idea to put
> the responsible custodian on Cc:
>
>
>    
>>   drivers/net/fec_mxc.c |    9 +++++----
>>   1 files changed, 5 insertions(+), 4 deletions(-)
>>      
> Applied, thanks.
>
>
> Ben, this is (as far as I see it) an undisputed bug fix, so I'm
> pulling this patch (and only this one from this series of 4)
> directly. Hope this is ok with you.
>
>
>    
Hold on a second.  This patch is wrong.  As Mike has pointed out, the 
net library already gets the MAC address from the environment.  The 
correct flow is:

1. Read from hardware in initialize() function
2. Read from environment in net/eth.c after initialize()
3. Give priority to the value in the environment if a conflict
4. Program hardware in the device's init() function.

If somebody wants to subvert the 'design philosophy', the right way is 
to call eth_dev->init() in board code.

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

Reply via email to