Re: [PATCH net] net: usb: lan78xx: only stop phylink if the interface is running

From: Andrew Lunn

Date: Fri Oct 30 2026 - 16:03:18 EST


On Fri, Oct 30, 2026 at 12:02:04AM +0800, YuanZhe Liu wrote:
> lan78xx_disconnect() unconditionally calls phylink_stop(), but
> phylink_start() is only called from lan78xx_open(). When the device is
> unplugged before the interface has been brought up, the attached PHY is
> still in PHY_READY and phy_stop() reports:
>
> called from state READY
> WARNING: drivers/net/phy/phy.c:1670 at phy_stop+0xad/0x380
>
> The same warning is emitted after an ifup/ifdown cycle, where the PHY is
> already in PHY_HALTED. Call phylink_stop() only when the network device is
> running, which is when phylink_start() has been called.
>
> Fixes: e110bc825897 ("net: usb: lan78xx: Convert to PHYLINK for improved PHY and MAC management")

Why did you pick this commit?

Andrew