RE: [RFC PATCH] net: phy: integrate reset-after-clock quirk into phy_init_hw

From: Wei Fang

Date: Thu Jan 29 2026 - 21:34:45 EST


> The current implementation of phy_reset_after_clk_enable requires MAC
> drivers
> (like fec_main.c) to manually track PHY probing states and trigger resets
> at specific points in their clock management flow and was created just for a SoC
> vendor. This leads to fragile code in the Ethernet driver, involving complex
> checks to see if the PHY device is bound.
>
> This patch proposes moving the handling of the PHY_RST_AFTER_CLK_EN flag
> directly
> into the generic phy_init_hw() function.
>
> Signed-off-by: Michael Trimarchi <michael@xxxxxxxxxxxxxxxxxxxx>
> ---
>
> I need to test better some boards that need this reset, but
> I need to confirm if the general approach is ok

This patch looks good to me, it is more generic than the previous
solution. I do not have a board that uses SMSC LAN8710/LAN8720
or other PHYs, so I can not help verify the solution, but I think it
should fix the issue that reported on the i.MX platform. Thanks.

Acked-by: Wei Fang <wei.fang@xxxxxxx>