[U-Boot] [PATCH] fec_mx.c: Fix MX27 FEC logic to check validity of the MAC address in fuse
Ben Warren
biggerbadderben at gmail.com
Mon Apr 26 06:52:07 CEST 2010
Eric,
On 4/15/2010 3:03 PM, Eric Jarrige wrote:
> Fix MX27 FEC logic to check validity of the MAC address in fuse.
> Only null (empty fuse) or invalid MAC address was retrieved from mx27 fuses before this change.
>
> Signed-off-by: Eric Jarrige<jorasse at armadeus.org>
> ---
> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
> index 8c4ade5..d7706b5 100644
> --- a/drivers/net/fec_mxc.c
> +++ b/drivers/net/fec_mxc.c
> @@ -325,7 +325,7 @@ static int fec_get_hwaddr(struct eth_device *dev, unsigned char *mac)
> for (i = 0; i< 6; i++)
> mac[6-1-i] = readl(&iim->iim_bank_area0[IIM0_MAC + i]);
>
> - return is_valid_ether_addr(mac);
> + return !is_valid_ether_addr(mac);
> #endif
> }
>
>
Nice catch! Applied to net repo, although I had to fix whitespace
issues and shortened your title.
thanks,
Ben
More information about the U-Boot
mailing list