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

From: Andrew Lunn

Date: Sun Oct 18 2026 - 15:22:30 EST


> @@ -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