net: fec: Fix multicast list setup in fec_restart().
authorChristoph Müllner <christoph.muellner@theobroma-systems.com>
Thu, 27 Jun 2013 19:18:23 +0000 (21:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Jul 2013 20:29:26 +0000 (13:29 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c

index ed6180e7db2fa028edff83621ffd8b9d3e2faf9c..5664acd8e0f49684596443ab1424bb231a27c956 100644 (file)
@@ -59,6 +59,8 @@
 
 #include "fec.h"
 
+static void set_multicast_list(struct net_device *ndev);
+
 #if defined(CONFIG_ARM)
 #define FEC_ALIGNMENT  0xf
 #else
@@ -470,9 +472,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);