[U-Boot] net, kirkwood_egiga: init mac address before using network commands

Mike Frysinger vapier at gentoo.org
Tue Mar 30 09:35:09 CEST 2010


On Tuesday 30 March 2010 01:38:39 Heiko Schocher wrote:
> diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c
> index 2ad7fea..e8b3777 100644
> --- a/drivers/net/kirkwood_egiga.c
> +++ b/drivers/net/kirkwood_egiga.c
> @@ -678,7 +678,7 @@ int kirkwood_egiga_initialize(bd_t * bis)
>  			return -1;
>  		}
> 
> -		while (!eth_getenv_enetaddr(s, dev->enetaddr)) {
> +		if (!eth_getenv_enetaddr(s, dev->enetaddr)) {

this too is broken (not just your change, but also the existing code).  please 
instead fix it to follow the documented MAC handling.  the initialize function 
should seed dev->enetaddr with the eeprom value only while the init function 
should take care of programming dev->enetaddr into the hardware's MAC 
registers.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100330/083884aa/attachment.pgp 


More information about the U-Boot mailing list