Re: [PATCH net] net: phy: micrel: fix LAN8814 QSGMII soft reset
From: Paolo Abeni
Date: Thu Apr 30 2026 - 07:31:00 EST
On 4/28/26 3:41 PM, Robert Marko wrote:
> LAN8814 QSGMII soft reset was moved into the probe function to avoid
> triggering it for each of 4 PHY-s in the package.
>
> However, that broke QSGMII link between the MAC and PHY on most LAN8814
> PHY-s, specificaly for us on the Microchip LAN969x switch.
> Reading the QSGMII status registers it was visible that lanes were only
> partially synced.
>
> It looks like the reset timing is crucial, so lets move the reset back
> into the .config_init function but guard it with phy_package_init_once()
> to avoid it being triggered on each of 4 PHY-s in the package.
> Change the probe function to use phy_package_probe_once() for coma and PtP
> setup.
>
> Fixes: 96a9178a29a6 ("net: phy: micrel: lan8814 fix reset of the QSGMII interface")
> Signed-off-by: Robert Marko <robert.marko@xxxxxxxxxx>
> ---
> drivers/net/phy/micrel.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index 2aa1dedd21b8..e211a523c258 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -4548,6 +4548,13 @@ static int lan8814_config_init(struct phy_device *phydev)
> struct kszphy_priv *lan8814 = phydev->priv;
> int ret;
>
> + if (phy_package_init_once(phydev))
> + /* Reset the PHY */
> + lanphy_modify_page_reg(phydev, LAN8814_PAGE_COMMON_REGS,
> + LAN8814_QSGMII_SOFT_RESET,
> + LAN8814_QSGMII_SOFT_RESET_BIT,
> + LAN8814_QSGMII_SOFT_RESET_BIT)
Sashiko says:
---
Could this introduce a race condition if multiple ports are brought up
concurrently?
Because phy_package_init_once() does not provide a synchronization
barrier for followers, they might proceed immediately to configure their
registers while the leader is still performing the reset.
---
on top of my head IDK if such race is possible at all.
/P