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

Bug#407217: Multicast broken in r8169 for one version of Thecus N2100



I'd like to get this bug fixed in some way for the N2100, either by
setting all bits in the multicast hash for this specific hardware
(assuming we can detect it programmatically) or by adjusting the way we
generate the multicast hash.

Vince, do you have a test for this specific hardware?  I know it's MAC
type 4 (RTL8169SB/RTL8110SB) but this bug seems to be more specific than
that.

Some time back it was discovered that in MMIO mode the 64-bit address
registers need to be written high-bits-first on this hardware, because
writing the high 32 bits clears the low 32 bits.  Given that the
multicast hash table is also a 64-bit register, maybe it suffers from a
similar bug?  It might be worth trying the following change:

--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3781,8 +3781,18 @@ static void rtl_set_rx_mode(struct net_device *dev)
 		mc_filter[1] = swab32(data);
 	}
 
+	pr_info("%s: mc_filter = { 0x%08x, 0x%08x }\n", __func__,
+		mc_filter[0], mc_filter[1]);
+
 	RTL_W32(MAR0 + 0, mc_filter[0]);
 	RTL_W32(MAR0 + 4, mc_filter[1]);
+	pr_info("%s: MAR = 0x%08lx%08lx\n", __func__,
+		RTL_R32(MAR0 + 4), RTL_R32(MAR0 + 0));
+
+	RTL_W32(MAR0 + 4, mc_filter[1]);
+	RTL_W32(MAR0 + 0, mc_filter[0]);
+	pr_info("%s: MAR = 0x%08lx%08lx\n", __func__,
+		RTL_R32(MAR0 + 4), RTL_R32(MAR0 + 0));
 
 	RTL_W32(RxConfig, tmp);
 
--- END ---

Ben.

-- 
Ben Hutchings
The most exhausting thing in life is being insincere. - Anne Morrow Lindberg

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


Reply to: