linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Muellner <christoph.muellner@theobroma-systems.com>
To: Fabio Estevam <festevam@gmail.com>,
	linux-kernel@vger.kernel.org,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	"David S . Miller" <davem@davemloft.net>,
	Fabio Estevam <fabio.estevam@freescale.com>,
	netdev@vger.kernel.org
Cc: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Subject: [PATCH v2] net: fec: Fix multicast list setup in fec_restart().
Date: Thu, 27 Jun 2013 21:18:23 +0200	[thread overview]
Message-ID: <1372360703-20526-1-git-send-email-christoph.muellner@theobroma-systems.com> (raw)
In-Reply-To: <61455.62.178.124.14.1371832855.squirrel@mail.theobroma-systems.com>

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


  parent reply	other threads:[~2013-06-27 19:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Christoph Muellner [this message]
2013-07-01 20:29   ` [PATCH v2] " David Miller

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=1372360703-20526-1-git-send-email-christoph.muellner@theobroma-systems.com \
    --to=christoph.muellner@theobroma-systems.com \
    --cc=davem@davemloft.net \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    /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).