瀏覽代碼

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>
Atsushi Nemoto 17 年之前
父節點
當前提交
84b7901f8d
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/net/macb.c

+ 2 - 0
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);