]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
macb: Call phy_disconnect on removing
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Thu, 10 Apr 2008 14:30:07 +0000 (23:30 +0900)
committerChris Wright <chrisw@sous-sol.org>
Sat, 19 Apr 2008 01:53:30 +0000 (18:53 -0700)
upstream commit: 84b7901f8d5a17536ef2df7fd628ab865df8fe3a

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>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/net/macb.c

index c796948051cb666100ef418229aae319b09f3d4f..20838f9ad1a4137154c7e9a1100df5b2cc2662cf 100644 (file)
@@ -1257,6 +1257,8 @@ static int __devexit 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);