[U-Boot] [PATCH] fec_mx.c: Fix MX27 FEC logic to check validity of the MAC address in fuse

Eric Jarrige eric.jarrige at armadeus.org
Fri Apr 16 00:03:19 CEST 2010


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
 }




More information about the U-Boot mailing list