netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] rtl8102e: commit 7bf6bf480 zeroized MAC address
@ 2008-10-15 10:11 c4p7n
  2008-10-15 12:31 ` Ivan Vecera
  0 siblings, 1 reply; 6+ messages in thread
From: c4p7n @ 2008-10-15 10:11 UTC (permalink / raw)
  To: netdev, Francois Romieu, Ivan Vecera; +Cc: kernel, netdev, c4p7n1

[-- Attachment #1: Type: text/plain, Size: 105 bytes --]

Tested on top of linus tree and back ported 2.6.27.

Please cc me, thanks
Martin Capitanio






[-- Attachment #2: r8169-01.patch --]
[-- Type: message/rfc822, Size: 1193 bytes --]




^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [patch] rtl8102e: commit 7bf6bf480 zeroized MAC address
@ 2008-10-15 13:57 c4p7n
  2008-10-15 22:50 ` Francois Romieu
  0 siblings, 1 reply; 6+ messages in thread
From: c4p7n @ 2008-10-15 13:57 UTC (permalink / raw)
  To: Ivan Vecera, netdev; +Cc: Francois Romieu, kernel

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


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

end of thread, other threads:[~2008-10-21 11:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 10:11 [patch] rtl8102e: commit 7bf6bf480 zeroized MAC address c4p7n
2008-10-15 12:31 ` Ivan Vecera
  -- strict thread matches above, loose matches on Subject: below --
2008-10-15 13:57 c4p7n
2008-10-15 22:50 ` Francois Romieu
2008-10-16 11:19   ` Martin Capitanio
2008-10-21 11:15   ` Ivan Vecera

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).