Re: [net-next v4 1/3] net: phy: motorcomm: move mdio lock out from yt8531_set_ds()
From: Andrew Lunn
Date: Wed May 20 2026 - 11:52:20 EST
On Wed, May 20, 2026 at 06:13:08PM +0800, Minda Chen wrote:
> yt8531_set_ds() default set register with mdio lock and only called
> with YT8531 PHY. But new type YT8531s support RGMII and has the same
> pin strength setting with YT8531, YT8531s need to call yt8531_set_ds()
> setting pin drive strength. But YT8531s config init function
> yt8521_config_init() already get the mdio lock with phy_select_page().
> If calling yt8521_config_init() with mdio lock will cause dead lock.
>
> Need to get the lock before calling yt8531_get_ds() and move mdio
> lock out from it for YT8531s.
>
> Signed-off-by: Minda Chen <minda.chen@xxxxxxxxxxxxxxxx>
> Reviewed-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew