Message ID | 8128fdb51eeebc9efbf3776a4097363a1317aaf1.1663905575.git.lukas@wunner.de (mailing list archive) |
---|---|
State | Accepted |
Commit | ea64cdfad124922c931633e39287c5a31a9b14a1 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] net: phy: Don't WARN for PHY_UP state in mdio_bus_phy_resume() | expand |
Hello: This patch was applied to netdev/net.git (master) by Paolo Abeni <pabeni@redhat.com>: On Fri, 23 Sep 2022 06:09:52 +0200 you wrote: > Commit 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() > state") introduced a WARN() on resume from system sleep if a PHY is not > in PHY_HALTED state. > > Commit 6dbe852c379f ("net: phy: Don't WARN for PHY_READY state in > mdio_bus_phy_resume()") added an exemption for PHY_READY state from > the WARN(). > > [...] Here is the summary with links: - [net] net: phy: Don't WARN for PHY_UP state in mdio_bus_phy_resume() https://git.kernel.org/netdev/net/c/ea64cdfad124 You are awesome, thank you!
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 2198f1302642..83cafa405720 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -316,11 +316,13 @@ static __maybe_unused int mdio_bus_phy_resume(struct device *dev) phydev->suspended_by_mdio_bus = 0; - /* If we manged to get here with the PHY state machine in a state neither - * PHY_HALTED nor PHY_READY this is an indication that something went wrong - * and we should most likely be using MAC managed PM and we are not. + /* If we managed to get here with the PHY state machine in a state + * neither PHY_HALTED, PHY_READY nor PHY_UP, this is an indication + * that something went wrong and we should most likely be using + * MAC managed PM, but we are not. */ - WARN_ON(phydev->state != PHY_HALTED && phydev->state != PHY_READY); + WARN_ON(phydev->state != PHY_HALTED && phydev->state != PHY_READY && + phydev->state != PHY_UP); ret = phy_init_hw(phydev); if (ret < 0)