All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fec_mx.c: Fix MX27 FEC logic to check validity of the MAC address in fuse
Date: Sun, 25 Apr 2010 21:52:07 -0700	[thread overview]
Message-ID: <4BD51BF7.9060103@gmail.com> (raw)
In-Reply-To: <D2EEA118-C57F-431D-9369-428080AB11B3@armadeus.org>

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

      reply	other threads:[~2010-04-26  4:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BD51BF7.9060103@gmail.com \
    --to=biggerbadderben@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.