linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ibm_newemac: Don't call dev_mc_add() before device is registered
@ 2008-08-17 21:29 Benjamin Herrenschmidt
  2008-08-27  9:56 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2008-08-17 21:29 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, Sebastian Siewior, linuxppc-dev list

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 <benh@kernel.crashing.org>
---

This fixes an uninitialized spinlock warning (and possibly more).

Please apply.

Cheers,
Ben.

Index: linux-work/drivers/net/ibm_newemac/core.c
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/core.c	2008-08-14 13:36:10.000000000 +1000
+++ linux-work/drivers/net/ibm_newemac/core.c	2008-08-14 13:42:10.000000000 +1000
@@ -663,9 +663,6 @@ static int emac_configure(struct emac_in
 	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 *
 	} 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);


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ibm_newemac: Don't call dev_mc_add() before device is registered
  2008-08-17 21:29 [PATCH] ibm_newemac: Don't call dev_mc_add() before device is registered Benjamin Herrenschmidt
@ 2008-08-27  9:56 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-08-27  9:56 UTC (permalink / raw)
  To: benh; +Cc: netdev, Sebastian Siewior, linuxppc-dev list

Benjamin Herrenschmidt wrote:
> 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 <benh@kernel.crashing.org>
> ---
> 
> This fixes an uninitialized spinlock warning (and possibly more).
> 
> Please apply.

applied

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-27  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-17 21:29 [PATCH] ibm_newemac: Don't call dev_mc_add() before device is registered Benjamin Herrenschmidt
2008-08-27  9:56 ` Jeff Garzik

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).