* [PATCH] davinci_emac.c: Fix IFF_ALLMULTI setup
@ 2013-10-21 16:59 Mariusz Ceier
2013-10-21 17:27 ` Sergei Shtylyov
0 siblings, 1 reply; 7+ messages in thread
From: Mariusz Ceier @ 2013-10-21 16:59 UTC (permalink / raw)
To: David S. Miller, Mugunthan V N, Lad Prabhakar, Jingoo Han,
Jiri Pirko
Cc: netdev, linux-kernel, Mariusz Ceier
When IFF_ALLMULTI flag is set on interface and IFF_PROMISC isn't,
emac_dev_mcast_set should only enable RX of multicasts and reset
MACHASH registers.
It does this, but afterwards it either sets up multicast MACs
filtering or disables RX of multicasts and resets MACHASH registers
again, rendering IFF_ALLMULTI flag useless.
This patch fixes emac_dev_mcast_set, so that multicast MACs filtering and
disabling of RX of multicasts are skipped when IFF_ALLMULTI flag is set.
Tested with kernel 2.6.37.
Signed-off-by: Mariusz Ceier <mceier+kernel@gmail.com>
---
drivers/net/ethernet/ti/davinci_emac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index 67df09e..ff3bf0e 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -876,7 +876,7 @@ static void emac_dev_mcast_set(struct net_device *ndev)
netdev_mc_count(ndev) > EMAC_DEF_MAX_MULTICAST_ADDRESSES) {
mbp_enable = (mbp_enable | EMAC_MBP_RXMCAST);
emac_add_mcast(priv, EMAC_ALL_MULTI_SET, NULL);
- }
+ } else
if (!netdev_mc_empty(ndev)) {
struct netdev_hw_addr *ha;
--
1.8.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] davinci_emac.c: Fix IFF_ALLMULTI setup
2013-10-21 16:59 [PATCH] davinci_emac.c: Fix IFF_ALLMULTI setup Mariusz Ceier
@ 2013-10-21 17:27 ` Sergei Shtylyov
2013-10-21 17:45 ` Mariusz Ceier
0 siblings, 1 reply; 7+ messages in thread
From: Sergei Shtylyov @ 2013-10-21 17:27 UTC (permalink / raw)
To: Mariusz Ceier, David S. Miller, Mugunthan V N, Lad Prabhakar,
Jingoo Han, Jiri Pirko
Cc: netdev, linux-kernel
Hello.
On 10/21/2013 08:59 PM, Mariusz Ceier wrote:
> When IFF_ALLMULTI flag is set on interface and IFF_PROMISC isn't,
> emac_dev_mcast_set should only enable RX of multicasts and reset
> MACHASH registers.
> It does this, but afterwards it either sets up multicast MACs
> filtering or disables RX of multicasts and resets MACHASH registers
> again, rendering IFF_ALLMULTI flag useless.
> This patch fixes emac_dev_mcast_set, so that multicast MACs filtering and
> disabling of RX of multicasts are skipped when IFF_ALLMULTI flag is set.
> Tested with kernel 2.6.37.
> Signed-off-by: Mariusz Ceier <mceier+kernel@gmail.com>
> ---
> drivers/net/ethernet/ti/davinci_emac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
> index 67df09e..ff3bf0e 100644
> --- a/drivers/net/ethernet/ti/davinci_emac.c
> +++ b/drivers/net/ethernet/ti/davinci_emac.c
> @@ -876,7 +876,7 @@ static void emac_dev_mcast_set(struct net_device *ndev)
> netdev_mc_count(ndev) > EMAC_DEF_MAX_MULTICAST_ADDRESSES) {
> mbp_enable = (mbp_enable | EMAC_MBP_RXMCAST);
> emac_add_mcast(priv, EMAC_ALL_MULTI_SET, NULL);
> - }
> + } else
> if (!netdev_mc_empty(ndev)) {
It should be:
} else if (!netdev_mc_empty(ndev)) {
WBR, Sergei
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH] davinci_emac.c: Fix IFF_ALLMULTI setup
2013-10-21 17:27 ` Sergei Shtylyov
@ 2013-10-21 17:45 ` Mariusz Ceier
2013-10-21 17:50 ` Mugunthan V N
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Mariusz Ceier @ 2013-10-21 17:45 UTC (permalink / raw)
To: David S. Miller, Mugunthan V N, Lad Prabhakar, Jingoo Han,
Jiri Pirko
Cc: netdev, linux-kernel, Mariusz Ceier
When IFF_ALLMULTI flag is set on interface and IFF_PROMISC isn't,
emac_dev_mcast_set should only enable RX of multicasts and reset
MACHASH registers.
It does this, but afterwards it either sets up multicast MACs
filtering or disables RX of multicasts and resets MACHASH registers
again, rendering IFF_ALLMULTI flag useless.
This patch fixes emac_dev_mcast_set, so that multicast MACs filtering and
disabling of RX of multicasts are skipped when IFF_ALLMULTI flag is set.
Tested with kernel 2.6.37.
Signed-off-by: Mariusz Ceier <mceier+kernel@gmail.com>
---
drivers/net/ethernet/ti/davinci_emac.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index 67df09e..6a32ef9 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -876,8 +876,7 @@ static void emac_dev_mcast_set(struct net_device *ndev)
netdev_mc_count(ndev) > EMAC_DEF_MAX_MULTICAST_ADDRESSES) {
mbp_enable = (mbp_enable | EMAC_MBP_RXMCAST);
emac_add_mcast(priv, EMAC_ALL_MULTI_SET, NULL);
- }
- if (!netdev_mc_empty(ndev)) {
+ } else if (!netdev_mc_empty(ndev)) {
struct netdev_hw_addr *ha;
mbp_enable = (mbp_enable | EMAC_MBP_RXMCAST);
--
1.8.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] davinci_emac.c: Fix IFF_ALLMULTI setup
2013-10-21 17:45 ` Mariusz Ceier
@ 2013-10-21 17:50 ` Mugunthan V N
2013-10-21 17:59 ` Mariusz Ceier
2013-10-21 22:57 ` David Miller
2013-10-22 2:34 ` Prabhakar Lad
2 siblings, 1 reply; 7+ messages in thread
From: Mugunthan V N @ 2013-10-21 17:50 UTC (permalink / raw)
To: Mariusz Ceier
Cc: David S. Miller, Lad Prabhakar, Jingoo Han, Jiri Pirko, netdev,
linux-kernel
On Monday 21 October 2013 11:15 PM, Mariusz Ceier wrote:
> When IFF_ALLMULTI flag is set on interface and IFF_PROMISC isn't,
> emac_dev_mcast_set should only enable RX of multicasts and reset
> MACHASH registers.
>
> It does this, but afterwards it either sets up multicast MACs
> filtering or disables RX of multicasts and resets MACHASH registers
> again, rendering IFF_ALLMULTI flag useless.
>
> This patch fixes emac_dev_mcast_set, so that multicast MACs filtering and
> disabling of RX of multicasts are skipped when IFF_ALLMULTI flag is set.
>
> Tested with kernel 2.6.37.
>
> Signed-off-by: Mariusz Ceier <mceier+kernel@gmail.com>
> ---
Can you add [PATCH v2] in your subject in future so that it will be
easier to the maintainer to pick the latest version of the patch.
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Regards
Mugunthan V N
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] davinci_emac.c: Fix IFF_ALLMULTI setup
2013-10-21 17:50 ` Mugunthan V N
@ 2013-10-21 17:59 ` Mariusz Ceier
0 siblings, 0 replies; 7+ messages in thread
From: Mariusz Ceier @ 2013-10-21 17:59 UTC (permalink / raw)
To: Mugunthan V N
Cc: David S. Miller, Lad Prabhakar, Jingoo Han, Jiri Pirko, netdev,
linux-kernel
Yes of course ;) This was my first patch for the kernel. I will
remember about v2 tag next time.
Thanks,
Mariusz Ceier
On 21 October 2013 19:50, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> On Monday 21 October 2013 11:15 PM, Mariusz Ceier wrote:
>> When IFF_ALLMULTI flag is set on interface and IFF_PROMISC isn't,
>> emac_dev_mcast_set should only enable RX of multicasts and reset
>> MACHASH registers.
>>
>> It does this, but afterwards it either sets up multicast MACs
>> filtering or disables RX of multicasts and resets MACHASH registers
>> again, rendering IFF_ALLMULTI flag useless.
>>
>> This patch fixes emac_dev_mcast_set, so that multicast MACs filtering and
>> disabling of RX of multicasts are skipped when IFF_ALLMULTI flag is set.
>>
>> Tested with kernel 2.6.37.
>>
>> Signed-off-by: Mariusz Ceier <mceier+kernel@gmail.com>
>> ---
> Can you add [PATCH v2] in your subject in future so that it will be
> easier to the maintainer to pick the latest version of the patch.
>
> Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
>
> Regards
> Mugunthan V N
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] davinci_emac.c: Fix IFF_ALLMULTI setup
2013-10-21 17:45 ` Mariusz Ceier
2013-10-21 17:50 ` Mugunthan V N
@ 2013-10-21 22:57 ` David Miller
2013-10-22 2:34 ` Prabhakar Lad
2 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2013-10-21 22:57 UTC (permalink / raw)
To: mceier+kernel
Cc: mugunthanvnm, prabhakar.csengg, jg1.han, jiri, netdev,
linux-kernel
From: Mariusz Ceier <mceier+kernel@gmail.com>
Date: Mon, 21 Oct 2013 19:45:04 +0200
> When IFF_ALLMULTI flag is set on interface and IFF_PROMISC isn't,
> emac_dev_mcast_set should only enable RX of multicasts and reset
> MACHASH registers.
>
> It does this, but afterwards it either sets up multicast MACs
> filtering or disables RX of multicasts and resets MACHASH registers
> again, rendering IFF_ALLMULTI flag useless.
>
> This patch fixes emac_dev_mcast_set, so that multicast MACs filtering and
> disabling of RX of multicasts are skipped when IFF_ALLMULTI flag is set.
>
> Tested with kernel 2.6.37.
>
> Signed-off-by: Mariusz Ceier <mceier+kernel@gmail.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] davinci_emac.c: Fix IFF_ALLMULTI setup
2013-10-21 17:45 ` Mariusz Ceier
2013-10-21 17:50 ` Mugunthan V N
2013-10-21 22:57 ` David Miller
@ 2013-10-22 2:34 ` Prabhakar Lad
2 siblings, 0 replies; 7+ messages in thread
From: Prabhakar Lad @ 2013-10-22 2:34 UTC (permalink / raw)
To: Mariusz Ceier
Cc: David S. Miller, Mugunthan V N, Jingoo Han, Jiri Pirko, netdev,
LKML
Hi Mariusz,
On Mon, Oct 21, 2013 at 11:15 PM, Mariusz Ceier <mceier+kernel@gmail.com> wrote:
> When IFF_ALLMULTI flag is set on interface and IFF_PROMISC isn't,
> emac_dev_mcast_set should only enable RX of multicasts and reset
> MACHASH registers.
>
> It does this, but afterwards it either sets up multicast MACs
> filtering or disables RX of multicasts and resets MACHASH registers
> again, rendering IFF_ALLMULTI flag useless.
>
> This patch fixes emac_dev_mcast_set, so that multicast MACs filtering and
> disabling of RX of multicasts are skipped when IFF_ALLMULTI flag is set.
>
> Tested with kernel 2.6.37.
>
It would have been better if you would have tested this on the latest kernel.
Anyway David has pulled this patch in his tree.
Regards,
--Prabhakar Lad
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-10-22 2:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-21 16:59 [PATCH] davinci_emac.c: Fix IFF_ALLMULTI setup Mariusz Ceier
2013-10-21 17:27 ` Sergei Shtylyov
2013-10-21 17:45 ` Mariusz Ceier
2013-10-21 17:50 ` Mugunthan V N
2013-10-21 17:59 ` Mariusz Ceier
2013-10-21 22:57 ` David Miller
2013-10-22 2:34 ` Prabhakar Lad
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).