Re: [PATCH net v2] net: usb: lan78xx: let unregister_netdev() stop phylink
From: Andrew Lunn
Date: Sun Nov 01 2026 - 14:24:23 EST
On Sun, Nov 01, 2026 at 01:26:28PM +0800, YuanZhe Liu wrote:
> Hi Andrew,
>
> Yes, I did, but it ended up at the bottom of my reply to the sashiko-bot
> review, which was not the right place for it. Here it is directly.
>
> e110bc825897 is the commit that introduced the call which warns. Before
> it, lan78xx_disconnect() did:
>
> unregister_netdev(net);
> ...
> phydev = net->phydev;
> phy_disconnect(net->phydev);
>
> and phy_stop() only existed in lan78xx_stop(), guarded by
> "if (net->phydev)". So disconnect never called phy_stop() on a PHY that
> had not been started, and the warning was not reachable from this path.
Yes, thanks. I see this patch puts things back into the same order as
before phylink was introduces, so it is correct.
Andrew