summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-04-10 23:30:07 +0900
committerJeff Garzik <jgarzik@redhat.com>2008-04-12 03:01:42 -0400
commit84b7901f8d5a17536ef2df7fd628ab865df8fe3a (patch)
treeb896855f33b12374e13c9df9f66f3a9fd70b3a4e /drivers
parent3d137fdd16b26be31a653f83d6ce4d3a1ed8701e (diff)
downloadlinux-84b7901f8d5a17536ef2df7fd628ab865df8fe3a.tar.bz2
macb: Call phy_disconnect on removing
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> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/macb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 1d210ed46130..10fcea59755e 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);