From: Paolo Abeni <pabeni@redhat.com>
To: Robert Marko <robert.marko@sartura.hr>,
andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
Divya.Koppera@microchip.com, horatiu.vultur@microchip.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: phy: micrel: fix LAN8814 QSGMII soft reset
Date: Thu, 30 Apr 2026 13:27:19 +0200 [thread overview]
Message-ID: <0060104c-bb38-45d5-8f8e-14708702feac@redhat.com> (raw)
In-Reply-To: <20260428134138.1741253-1-robert.marko@sartura.hr>
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@sartura.hr>
> ---
> 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
next prev parent reply other threads:[~2026-04-30 11:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 13:41 [PATCH net] net: phy: micrel: fix LAN8814 QSGMII soft reset Robert Marko
2026-04-30 11:27 ` Paolo Abeni [this message]
2026-04-30 14:49 ` Andrew Lunn
2026-04-30 16:06 ` Simon Horman
2026-05-01 0:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0060104c-bb38-45d5-8f8e-14708702feac@redhat.com \
--to=pabeni@redhat.com \
--cc=Divya.Koppera@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=robert.marko@sartura.hr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox