Skip to content
Commit e2badb4b authored by Kunihiko Hayashi's avatar Kunihiko Hayashi Committed by Jakub Kicinski
Browse files

net: ethernet: ave: Fix MAC to be in charge of PHY PM



The phylib callback is called after MAC driver's own resume callback is
called. For AVE driver, after resuming immediately, PHY state machine is
in PHY_NOLINK because there is a time lag from link-down to link-up due to
autoneg. The result is WARN_ON() dump in mdio_bus_phy_resume().

Since ave_resume() itself calls phy_resume(), AVE driver should manage
PHY PM. To indicate that MAC driver manages PHY PM, set
phydev->mac_managed_pm to true to avoid the unnecessary phylib call and
add missing phy_init_hw() to ave_resume().

Suggested-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Fixes: fba863b8

 ("net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM")
Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/20221024072227.24769-1-hayashi.kunihiko@socionext.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0a8b43b1
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