diff mbox

Possible bug with r8169 driver

Message ID 20120929190105.GA8903@electric-eye.fr.zoreil.com
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Francois Romieu Sept. 29, 2012, 7:01 p.m. UTC
Nolwenn <donolwenn@gmail.com> :
[...]
> The two dumps are attached (I hope it's what Michel wants !)

(Michel ?)

The device does not see the multicast router advertisement.

Please try the hack below.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Nolwenn Sept. 30, 2012, 7:17 p.m. UTC | #1
Le samedi 29 septembre 2012 21:01:05 Francois Romieu a écrit :
> Nolwenn <donolwenn@gmail.com> :
> [...]
> 
> > The two dumps are attached (I hope it's what Michel wants !)
> 
> (Michel ?)
> 
> The device does not see the multicast router advertisement.
> 
> Please try the hack below.
> 
> diff --git a/drivers/net/ethernet/realtek/r8169.c
> b/drivers/net/ethernet/realtek/r8169.c index b47d5b3..8080dac 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -4522,6 +4522,8 @@ static void rtl_set_rx_mode(struct net_device *dev)
> 
>  		mc_filter[0] = swab32(mc_filter[1]);
>  		mc_filter[1] = swab32(data);
> +		tmp |= 0xff7e1880;
> +		RTL_W32(RxConfig, tmp);
>  	}
> 
>  	RTL_W32(MAR0 + 4, mc_filter[1]);

Why I wrote Michel? There might be a bug between chair and keyboard :P

I download linux-3.5.4 from kernel.org, I create a patch file from lines above, 
try to apply the patch with "patch -p1 -i patch" but modification fail so I 
modify the file by hand. After learning how to compile a kernel, install it and 
boot on it, networking seems to be ok (networkmanager display a connection) 
but I cannot reach any website.
I join my r8169 file, maybe I make a mistake in modification.

tcpdump -pw kernel-hack-promisc-off
tcpdump -w kernel-hack-promisc-on
diff mbox

Patch

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index b47d5b3..8080dac 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -4522,6 +4522,8 @@  static void rtl_set_rx_mode(struct net_device *dev)
 
 		mc_filter[0] = swab32(mc_filter[1]);
 		mc_filter[1] = swab32(data);
+		tmp |= 0xff7e1880;
+		RTL_W32(RxConfig, tmp);
 	}
 
 	RTL_W32(MAR0 + 4, mc_filter[1]);