* [PATCH] net: fec: Fix multicast list setup in fec_restart().
@ 2013-06-21 16:40 Christoph Müllner
2013-06-21 17:15 ` Fabio Estevam
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Christoph Müllner @ 2013-06-21 16:40 UTC (permalink / raw)
To: linux-kernel
Cc: Grant Likely, Rob Herring, David S. Miller, Fabio Estevam, netdev
Setup the multicast list of the net_device instead of
clearing it blindly. This restores the multicast groups
in case of a link down/up event.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
---
drivers/net/ethernet/freescale/fec_main.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c
b/drivers/net/ethernet/freescale/fec_main.c
index a667015..8e8e743 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -60,6 +60,8 @@
#include "fec.h"
+static void set_multicast_list(struct net_device *ndev);
+
#if defined(CONFIG_ARM)
#define FEC_ALIGNMENT 0xf
#else
@@ -472,8 +474,7 @@ fec_restart(struct net_device *ndev, int duplex)
writel(0xffc00000, fep->hwp + FEC_IEVENT);
/* Reset all multicast. */
- writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
- writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
+ set_multicast_list(ndev);
#ifndef CONFIG_M5272
writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] net: fec: Fix multicast list setup in fec_restart().
2013-06-21 16:40 [PATCH] net: fec: Fix multicast list setup in fec_restart() Christoph Müllner
@ 2013-06-21 17:15 ` Fabio Estevam
2013-06-27 17:14 ` Christoph Müllner
2013-06-21 17:25 ` Joe Perches
2013-06-27 19:18 ` [PATCH v2] " Christoph Muellner
2 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2013-06-21 17:15 UTC (permalink / raw)
To: Christoph Müllner
Cc: linux-kernel, Grant Likely, Rob Herring, David S. Miller,
Fabio Estevam, netdev
On Fri, Jun 21, 2013 at 1:40 PM, Christoph Müllner
<christoph.muellner@theobroma-systems.com> wrote:
> @@ -472,8 +474,7 @@ fec_restart(struct net_device *ndev, int duplex)
> writel(0xffc00000, fep->hwp + FEC_IEVENT);
>
> /* Reset all multicast. */
Should this comment be removed/updated now?
> - writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
> - writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
> + set_multicast_list(ndev);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: fec: Fix multicast list setup in fec_restart().
2013-06-21 16:40 [PATCH] net: fec: Fix multicast list setup in fec_restart() Christoph Müllner
2013-06-21 17:15 ` Fabio Estevam
@ 2013-06-21 17:25 ` Joe Perches
2013-06-27 19:18 ` [PATCH v2] " Christoph Muellner
2 siblings, 0 replies; 7+ messages in thread
From: Joe Perches @ 2013-06-21 17:25 UTC (permalink / raw)
To: Christoph Müllner
Cc: linux-kernel, Grant Likely, Rob Herring, David S. Miller,
Fabio Estevam, netdev
On Fri, 2013-06-21 at 18:40 +0200, Christoph Müllner wrote:
> Setup the multicast list of the net_device instead of
> clearing it blindly. This restores the multicast groups
> in case of a link down/up event.
>
> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Theobroma?
food of the gods or does your company just like chocolate?
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
[]
> +static void set_multicast_list(struct net_device *ndev);
[]
> @@ -472,8 +474,7 @@ fec_restart(struct net_device *ndev, int duplex)
> writel(0xffc00000, fep->hwp + FEC_IEVENT);
>
> /* Reset all multicast. */
> - writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
> - writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
> + set_multicast_list(ndev);
maybe dev_set_rx_mode(ndev) ?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: fec: Fix multicast list setup in fec_restart().
2013-06-21 17:15 ` Fabio Estevam
@ 2013-06-27 17:14 ` Christoph Müllner
2013-06-27 17:21 ` Fabio Estevam
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Müllner @ 2013-06-27 17:14 UTC (permalink / raw)
To: Fabio Estevam
Cc: linux-kernel, Grant Likely, Rob Herring, David S. Miller,
Fabio Estevam, netdev
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
On Jun 21, 2013, at 7:15 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Fri, Jun 21, 2013 at 1:40 PM, Christoph Müllner
> <christoph.muellner@theobroma-systems.com> wrote:
>
>> @@ -472,8 +474,7 @@ fec_restart(struct net_device *ndev, int duplex)
>> writel(0xffc00000, fep->hwp + FEC_IEVENT);
>>
>> /* Reset all multicast. */
>
> Should this comment be removed/updated now?
Is updated in the attached patch.
Thank you for the feedback!
>
>> - writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
>> - writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
>> + set_multicast_list(ndev);
[-- Attachment #2: 0001-net-fec-Fix-multicast-list-setup-in-fec_restart.patch --]
[-- Type: application/octet-stream, Size: 1506 bytes --]
From efc0a82aa810cf3c37505cf3c753ad6f1cf33572 Mon Sep 17 00:00:00 2001
From: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Date: Fri, 21 Jun 2013 17:59:52 +0200
Subject: [PATCH] net: fec: Fix multicast list setup in fec_restart().
Setup the multicast list of the net_device instead of
clearing it blindly. This restores the multicast groups
in case of a link down/up event or when resuming from
suspend.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
---
drivers/net/ethernet/freescale/fec_main.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index d48099f..4c32709 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -60,6 +60,8 @@
#include "fec.h"
+static void set_multicast_list(struct net_device *ndev);
+
#if defined(CONFIG_ARM)
#define FEC_ALIGNMENT 0xf
#else
@@ -471,9 +473,8 @@ fec_restart(struct net_device *ndev, int duplex)
/* Clear any outstanding interrupt. */
writel(0xffc00000, fep->hwp + FEC_IEVENT);
- /* Reset all multicast. */
- writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
- writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
+ /* Setup multicast filter. */
+ set_multicast_list(ndev);
#ifndef CONFIG_M5272
writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] net: fec: Fix multicast list setup in fec_restart().
2013-06-27 17:14 ` Christoph Müllner
@ 2013-06-27 17:21 ` Fabio Estevam
0 siblings, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2013-06-27 17:21 UTC (permalink / raw)
To: Christoph Müllner
Cc: linux-kernel, Grant Likely, Rob Herring, David S. Miller,
Fabio Estevam, netdev
On Thu, Jun 27, 2013 at 2:14 PM, Christoph Müllner
<christoph.muellner@theobroma-systems.com> wrote:
> Is updated in the attached patch.
> Thank you for the feedback!
Looks good. Some suggestions:
- Mark the patch as the second version:
Subject: [PATCH v2] net: fec: Fix multicast list setup in fec_restart().
- Add a comment below the --- line explaining what you changed in v2.
Something like:
---
Changes since v1:
- Adapt the comment to the code change
- Then re-send it via git send-email to the list instead of sending it
via attachment.
Thanks,
Fabio Estevam
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] net: fec: Fix multicast list setup in fec_restart().
2013-06-21 16:40 [PATCH] net: fec: Fix multicast list setup in fec_restart() Christoph Müllner
2013-06-21 17:15 ` Fabio Estevam
2013-06-21 17:25 ` Joe Perches
@ 2013-06-27 19:18 ` Christoph Muellner
2013-07-01 20:29 ` David Miller
2 siblings, 1 reply; 7+ messages in thread
From: Christoph Muellner @ 2013-06-27 19:18 UTC (permalink / raw)
To: Fabio Estevam, linux-kernel, Grant Likely, Rob Herring,
David S . Miller, Fabio Estevam, netdev
Cc: Christoph Muellner
Setup the multicast list of the net_device instead of
clearing it blindly. This restores the multicast groups
in case of a link down/up event or when resuming from
suspend.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
---
Changes since v1:
- Adapt the comment to the code change
drivers/net/ethernet/freescale/fec_main.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index d48099f..4c32709 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -60,6 +60,8 @@
#include "fec.h"
+static void set_multicast_list(struct net_device *ndev);
+
#if defined(CONFIG_ARM)
#define FEC_ALIGNMENT 0xf
#else
@@ -471,9 +473,8 @@ fec_restart(struct net_device *ndev, int duplex)
/* Clear any outstanding interrupt. */
writel(0xffc00000, fep->hwp + FEC_IEVENT);
- /* Reset all multicast. */
- writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
- writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
+ /* Setup multicast filter. */
+ set_multicast_list(ndev);
#ifndef CONFIG_M5272
writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] net: fec: Fix multicast list setup in fec_restart().
2013-06-27 19:18 ` [PATCH v2] " Christoph Muellner
@ 2013-07-01 20:29 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2013-07-01 20:29 UTC (permalink / raw)
To: christoph.muellner
Cc: festevam, linux-kernel, grant.likely, rob.herring, fabio.estevam, netdev
From: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Date: Thu, 27 Jun 2013 21:18:23 +0200
> Setup the multicast list of the net_device instead of
> clearing it blindly. This restores the multicast groups
> in case of a link down/up event or when resuming from
> suspend.
>
> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-07-01 20:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-21 16:40 [PATCH] net: fec: Fix multicast list setup in fec_restart() Christoph Müllner
2013-06-21 17:15 ` Fabio Estevam
2013-06-27 17:14 ` Christoph Müllner
2013-06-27 17:21 ` Fabio Estevam
2013-06-21 17:25 ` Joe Perches
2013-06-27 19:18 ` [PATCH v2] " Christoph Muellner
2013-07-01 20:29 ` David Miller
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).