[U-Boot] [PATCH 2/3] net: fec_mxc: avoid transfer dev_id -1 to get mac address from fuse

Stefano Babic sbabic at denx.de
Wed Apr 12 16:22:13 UTC 2017


On 10/04/2017 13:44, Peng Fan wrote:
> From: Andy Duan <fugang.duan at nxp.com>
> 
> Avoid transfer parameter dev_id value with "-1" to .fec_get_hwaddr(),
> it should transfer fec->dev_id to get mac address from fuse.
> 
> Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> Cc: Joe Hershberger <joe.hershberger at ni.com>
> ---
>  drivers/net/fec_mxc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
> index ac7afb5..d67a69b 100644
> --- a/drivers/net/fec_mxc.c
> +++ b/drivers/net/fec_mxc.c
> @@ -1086,8 +1086,8 @@ static int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
>  #endif
>  	eth_register(edev);
>  
> -	if (fec_get_hwaddr(dev_id, ethaddr) == 0) {
> -		debug("got MAC%d address from fuse: %pM\n", dev_id, ethaddr);
> +	if (fec_get_hwaddr(fec->dev_id, ethaddr) == 0) {
> +		debug("got MAC%d address from fuse: %pM\n", fec->dev_id, ethaddr);
>  		memcpy(edev->enetaddr, ethaddr, 6);
>  		if (!getenv("ethaddr"))
>  			eth_setenv_enetaddr("ethaddr", ethaddr);
> 

Right !

Acked-by: Stefano Babic <sbabic at denx.de>

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list