netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] macb: Call phy_disconnect on removing
@ 2008-04-10 14:30 Atsushi Nemoto
  2008-04-12  7:02 ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Atsushi Nemoto @ 2008-04-10 14:30 UTC (permalink / raw)
  To: Haavard Skinnemoen; +Cc: Jeff Garzik, netdev

Call phy_disconnect() on remove routine.  Otherwise the phy timer
causes a kernel crash when unloading.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 1d210ed..10fcea5 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -1257,6 +1257,8 @@ static int __exit macb_remove(struct platform_device *pdev)
 
 	if (dev) {
 		bp = netdev_priv(dev);
+		if (bp->phy_dev)
+			phy_disconnect(bp->phy_dev);
 		mdiobus_unregister(&bp->mii_bus);
 		kfree(bp->mii_bus.irq);
 		unregister_netdev(dev);

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

end of thread, other threads:[~2008-04-16  4:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-10 14:30 [PATCH] macb: Call phy_disconnect on removing Atsushi Nemoto
2008-04-12  7:02 ` Jeff Garzik
2008-04-15  8:53   ` Andrew Morton
2008-04-15 16:35     ` Atsushi Nemoto
2008-04-16  4:57       ` Haavard Skinnemoen

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