Skip to content
Commit 6dbe852c authored by Xiaolei Wang's avatar Xiaolei Wang Committed by Jakub Kicinski
Browse files

net: phy: Don't WARN for PHY_READY state in mdio_bus_phy_resume()

For some MAC drivers, they set the mac_managed_pm to true in its
->ndo_open() callback. So before the mac_managed_pm is set to true,
we still want to leverage the mdio_bus_phy_suspend()/resume() for
the phy device suspend and resume. In this case, the phy device is
in PHY_READY, and we shouldn't warn about this. It also seems that
the check of mac_managed_pm in WARN_ON is redundant since we already
check this in the entry of mdio_bus_phy_resume(), so drop it.

Fixes: 744d23c7

 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")
Signed-off-by: default avatarXiaolei Wang <xiaolei.wang@windriver.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220819082451.1992102-1-xiaolei.wang@windriver.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b8d43803
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment