From: Benjamin Herrenschmidt Date: Sun, 17 Aug 2008 21:29:23 +0000 (+1000) Subject: ibm_newemac: Don't call dev_mc_add() before device is registered X-Git-Tag: v2.6.27-rc5~8^2~4^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8296582783a9f3bf75dbeb98dfdae15fd45c008;p=platform%2Fkernel%2Flinux-3.10.git ibm_newemac: Don't call dev_mc_add() before device is registered We must not call dev_mc_add() from within our HW configure which happens before we initialize and register the netdev. Do it in open() instead. Thanks to Sebastian Siewior for tracking it down. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 2e720f2..ccd9d90 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c @@ -663,9 +663,6 @@ static int emac_configure(struct emac_instance *dev) if (emac_phy_gpcs(dev->phy.mode)) emac_mii_reset_phy(&dev->phy); - /* Required for Pause packet support in EMAC */ - dev_mc_add(ndev, default_mcast_addr, sizeof(default_mcast_addr), 1); - return 0; } @@ -1150,6 +1147,9 @@ static int emac_open(struct net_device *ndev) } else netif_carrier_on(dev->ndev); + /* Required for Pause packet support in EMAC */ + dev_mc_add(ndev, default_mcast_addr, sizeof(default_mcast_addr), 1); + emac_configure(dev); mal_poll_add(dev->mal, &dev->commac); mal_enable_tx_channel(dev->mal, dev->mal_tx_chan);