[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#514268: linux-source-2.6.26: Realtek network card driver (r8169) doesn't handle multicast



The upstream fixes are:

commit 1087f4f4af302e6e2fa40dd741f306444d90bece
Author: Francois Romieu <romieu@fr.zoreil.com>
Date:   Wed Dec 26 22:46:05 2007 +0100

    r8169: multicast register update (sync with Realtek's 8.004.00 8168 driver)
    
    The layout of the 8168 serie is different from that of the 8110 one.
    
    Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
    Cc: Edward Hsu <edward_hsu@realtek.com.tw>

commit f887cce8de019bb32917789379af89ae4c0294ee
Author: Francois Romieu <romieu@fr.zoreil.com>
Date:   Thu Jul 17 22:24:18 2008 +0200

    r8169: multicast register update
    
    The layout of the 8101 series is identical to that of the 8168 one,
    thus allowing to pack everything not 8169 related above MAC_VER_06.
    New 810x and 8168 chipsets should automagically behave correctly.
    
    It matches code in Realtek's 1.008.00 8101 and 8.007.00 8168 drivers.
    
    Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Which can be combined into:

diff -u b/drivers/net/r8169.c b/drivers/net/r8169.c
--- b/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3091,15 +3091,11 @@
 	tmp = rtl8169_rx_config | rx_mode |
 	      (RTL_R32(RxConfig) & rtl_chip_info[tp->chipset].RxConfigMask);
 
-	if ((tp->mac_version == RTL_GIGA_MAC_VER_11) ||
-	    (tp->mac_version == RTL_GIGA_MAC_VER_12) ||
-	    (tp->mac_version == RTL_GIGA_MAC_VER_13) ||
-	    (tp->mac_version == RTL_GIGA_MAC_VER_14) ||
-	    (tp->mac_version == RTL_GIGA_MAC_VER_15) ||
-	    (tp->mac_version == RTL_GIGA_MAC_VER_16) ||
-	    (tp->mac_version == RTL_GIGA_MAC_VER_17)) {
-		mc_filter[0] = 0xffffffff;
-		mc_filter[1] = 0xffffffff;
+	if (tp->mac_version > RTL_GIGA_MAC_VER_06) {
+		u32 data = mc_filter[0];
+
+		mc_filter[0] = swab32(mc_filter[1]);
+		mc_filter[1] = swab32(data);
 	}
 
 	RTL_W32(MAR0 + 0, mc_filter[0]);
--- END ---

Ben.

-- 
Ben Hutchings
Logic doesn't apply to the real world. - Marvin Minsky

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: