Thread (2 messages) 2 messages, 2 authors, 7d ago

Re: [PATCH net] net: pxa168_eth: quiesce the interface before releasing resources

flat view

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-10-18 19:22:16
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help