public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] fec_mx.c: Fix MX27 FEC logic to check validity of the MAC address in fuse
@ 2010-04-15 22:03 Eric Jarrige
  2010-04-26  4:52 ` Ben Warren
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Jarrige @ 2010-04-15 22:03 UTC (permalink / raw)
  To: u-boot

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@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
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-26  4:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-15 22:03 [U-Boot] [PATCH] fec_mx.c: Fix MX27 FEC logic to check validity of the MAC address in fuse Eric Jarrige
2010-04-26  4:52 ` Ben Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox