netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] at91_ether: multicast packet are not received due to incorrect setting of the multicast hashtable, kernel linux-2.6.17.3
@ 2008-10-26 17:31 Leonid Slobodchikov
  2008-10-26 23:51 ` Aras Vaichas
  2008-10-27  0:16 ` [PATCH] at91_ether: multicast packet are not received due toincorrect " Gururaja Hebbar K R
  0 siblings, 2 replies; 4+ messages in thread
From: Leonid Slobodchikov @ 2008-10-26 17:31 UTC (permalink / raw)
  To: netdev; +Cc: linux-arm-kernel

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

Hello,

Multicast packets are not received by the Ethernet driver for the
Atmel AT91RM9200. This is due to incorrect mc_filter array index
evaluation in the at91ether_sethashtable function. The point is that
AT91_EMAC_HSH and AT91_EMAC_HSL registers are 64-bit length. So when
evaluating the index the bit number must be diveded at 64, which is
2^6, not 2^5.
The below is a fix for that issue.


--- drivers/net/arm/at91_ether.c.orig	2006-06-30 20:37:38.000000000 +0300
+++ drivers/net/arm/at91_ether.c	2008-10-26 17:35:50.000000000 +0200
@@ -520,7 +520,7 @@ static void at91ether_sethashtable(struc
 		if (!curr) break;	/* unexpected end of list */

 		bitnr = hash_get_index(curr->dmi_addr);
-		mc_filter[bitnr >> 5] |= 1 << (bitnr & 31);
+		mc_filter[bitnr >> 6] |= 1 << (bitnr & 31);
 	}

 	at91_emac_write(AT91_EMAC_HSH, mc_filter[0]);

Signed-off-by: Leonid V. Slobodchikov <curvex@gmail.com>

Best regards,
Leonid Slobodchikov

[-- Attachment #2: at91_ether.patch.gz --]
[-- Type: application/x-gzip, Size: 362 bytes --]

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

end of thread, other threads:[~2008-10-27  1:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-26 17:31 [PATCH] at91_ether: multicast packet are not received due to incorrect setting of the multicast hashtable, kernel linux-2.6.17.3 Leonid Slobodchikov
2008-10-26 23:51 ` Aras Vaichas
2008-10-27  1:10   ` Leonid Slobodchikov
2008-10-27  0:16 ` [PATCH] at91_ether: multicast packet are not received due toincorrect " Gururaja Hebbar K R

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