aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-04-10 10:30:07 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-12 03:01:42 -0400
commit84b7901f8d5a17536ef2df7fd628ab865df8fe3a (patch)
treeb896855f33b12374e13c9df9f66f3a9fd70b3a4e /drivers
parent3d137fdd16b26be31a653f83d6ce4d3a1ed8701e (diff)
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)
1257 1257
1258 if (dev) { 1258 if (dev) {
1259 bp = netdev_priv(dev); 1259 bp = netdev_priv(dev);
1260 if (bp->phy_dev)
1261 phy_disconnect(bp->phy_dev);
1260 mdiobus_unregister(&bp->mii_bus); 1262 mdiobus_unregister(&bp->mii_bus);
1261 kfree(bp->mii_bus.irq); 1263 kfree(bp->mii_bus.irq);
1262 unregister_netdev(dev); 1264 unregister_netdev(dev);