netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: c4p7n@capitanio.org
To: "Ivan Vecera" <ivecera@redhat.com>, netdev@vger.kernel.org
Cc: "Francois Romieu" <romieu@fr.zoreil.com>, kernel@vger.kernel.org
Subject: Re: [patch] rtl8102e: commit 7bf6bf480 zeroized MAC address
Date: Wed, 15 Oct 2008 15:57:35 +0200 (MEST)	[thread overview]
Message-ID: <200810151357.m9FDvZqk028829@post.webmailer.de> (raw)

>From: Ivan Vecera<ivecera@redhat.com>
> c4p7n@capitanio.org wrote:
> > Tested on top of linus tree and back ported 2.6.27.
> > 
> > Please cc me, thanks
> > Martin Capitanio
> > 
> I think this one is more common.

What about to mix both?
If the address is not stored here than it must be somewhere else --
or the read algorithm is broken ;-)

May be we are reading just by luck zeros and not a random perfectly sane address.
Personally I would prefer in this fine driver, just not doing what is not absolutely
needed. It would be great to figure out if all of the rtl8102e, etc. doesn't have this location. 

You can hardly desolder those chips from notebooks and I am really happy if this
_just works_ with as much realtek blessing as possible.

Martin

P.S. Apologize, I'm forced to use this * webmailer.
> 
> Ivan
> 
> =====
> Subject: [PATCH] [r8169] initialize MAC address found in EEPROM only if is
> it valid
> 
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> ---
>  drivers/net/r8169.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
> index c821da2..587a96c 100644
> --- a/drivers/net/r8169.c
> +++ b/drivers/net/r8169.c
> @@ -1975,8 +1975,9 @@ static void rtl_init_mac_address(struct
> rtl8169_private *tp,
>  
>  	dprintk("MAC address found in EEPROM: %s\n", print_mac(buf, mac));
>  
> -	/* Write MAC address */
> -	rtl_rar_set(tp, mac);
> +	/* Write MAC address if is it valid */
> +	if (is_valid_ether_addr(mac))
> +		rtl_rar_set(tp, mac);
>  }
>  
>  static int __devinit
> -- 
> 1.5.6.3
> 

--- original message end ----


             reply	other threads:[~2008-10-15 13:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-15 13:57 c4p7n [this message]
2008-10-15 22:50 ` [patch] rtl8102e: commit 7bf6bf480 zeroized MAC address Francois Romieu
2008-10-16 11:19   ` Martin Capitanio
2008-10-21 11:15   ` Ivan Vecera
  -- strict thread matches above, loose matches on Subject: below --
2008-10-15 10:11 c4p7n
2008-10-15 12:31 ` Ivan Vecera

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=200810151357.m9FDvZqk028829@post.webmailer.de \
    --to=c4p7n@capitanio.org \
    --cc=ivecera@redhat.com \
    --cc=kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).