quoted hunk ↗ jump to hunk
@@ -1528,18 +1529,21 @@ static void pxa168_eth_remove(struct platform_device *pdev)
struct net_device *dev = platform_get_drvdata(pdev);
struct pxa168_eth_private *pep = netdev_priv(dev);
- cancel_work_sync(&pep->tx_timeout_task);
+ disable_work_sync(&pep->tx_timeout_task);
+ rtnl_lock();
+ dev_close(dev);
+ if (dev->phydev)
+ phy_disconnect(dev->phydev);
+ unregister_netdevice(dev);
+ rtnl_unlock();
+
pxa168_eth_remove() should be the opposite of pxa168_eth_probe.
phy_connect_direct() is not called in probe, so phy_diconnect() should
not be called in remove.
Please fix this correctly, not make the code worse. Look at the
architecture, and fix the broken architecture.
Andrew
---
pw-bot: cr