From: Aras Vaichas <arasv@magtech.com.au>
To: Leonid Slobodchikov <curvex@gmail.com>
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.arm.linux.org.uk,
Andrew Victor <avictor.za@gmail.com>
Subject: Re: [PATCH] at91_ether: multicast packet are not received due to incorrect setting of the multicast hashtable, kernel linux-2.6.17.3
Date: Mon, 27 Oct 2008 10:51:24 +1100 [thread overview]
Message-ID: <4905027C.4080504@magtech.com.au> (raw)
In-Reply-To: <5f59dc1a0810261031w2fa3f40bne1edb2d710f64404@mail.gmail.com>
Leonid Slobodchikov wrote:
> 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]);
>
Hmm, that is strange. I received a patch quite some time ago from Andrew
Victor to fix just such a problem. Maybe it reappeared? Or maybe I
didn't test my patch patch well enough?
--- SNIP ---
hi Aras,
> I'm using 2.6.16, at91rm9200 with a DM9161 PHY. I can't receive multicast
> packets on eth0 unless I enable "allmulti" using ifconfig - which I
shouldn't
> have to do.
Looks like the bug in the AT91RM9200 Ethernet driver's Multicast support
might have been found.
Since I know you use multicast, could you possibly test this patch
(without enabling "allmulti") and let me know? Thanks.
Regards.
Andrew Victor
--- linux-2.6/drivers/net/arm/at91_ether.c.orig 2007-04-25
09:46:29.000000000 +0200
+++ linux-2.6/drivers/net/arm/at91_ether.c 2007-04-25
10:00:25.000000000 +0200
@@ -535,8 +535,8 @@ static void at91ether_sethashtable(struc
mc_filter[bitnr >> 5] |= 1 << (bitnr & 31);
}
- at91_emac_write(AT91_EMAC_HSH, mc_filter[0]);
- at91_emac_write(AT91_EMAC_HSL, mc_filter[1]);
+ at91_emac_write(AT91_EMAC_HSL, mc_filter[0]);
+ at91_emac_write(AT91_EMAC_HSH, mc_filter[1]);
}
/*
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
next prev parent reply other threads:[~2008-10-26 23:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4905027C.4080504@magtech.com.au \
--to=arasv@magtech.com.au \
--cc=avictor.za@gmail.com \
--cc=curvex@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).