From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Sun, 25 Apr 2010 21:52:07 -0700 Subject: [U-Boot] [PATCH] fec_mx.c: Fix MX27 FEC logic to check validity of the MAC address in fuse In-Reply-To: References: Message-ID: <4BD51BF7.9060103@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- > 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