Netdev List
 help / color / mirror / Atom feed
* [PATCH 6.12.y] net: phy: micrel: fix LAN8814 QSGMII soft reset
@ 2026-05-29  9:43 Joël ESPONDE
  2026-06-03 15:13 ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: Joël ESPONDE @ 2026-05-29  9:43 UTC (permalink / raw)
  To: gregkh@linuxfoundation.org, stable@vger.kernel.org
  Cc: netdev@vger.kernel.org, Robert Marko, Jakub Kicinski,
	Horatiu Vultur

From: Robert Marko <robert.marko@sartura.hr>

[ Upstream commit e027c218c482c6a0ae1948129ccda3b0a2033368 ]

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: 347bf638d39ff92 ("net: phy: micrel: lan8814 fix reset of the
QSGMII interface")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Link:
https://patch.msgid.link/20260428134138.1741253-1-robert.marko@sartura.hr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Joël Esponde <joel.esponde@leroy-agon.com>
---
  drivers/net/phy/micrel.c | 15 ++++++++-------
  1 file changed, 8 insertions(+), 7 deletions(-)

(limited to 'drivers/net/phy/micrel.c')

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 2aa1dedd21b8eb..e211a523c2584e 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -4099,6 +4099,13 @@ static int lan8814_config_init(struct phy_device
*phydev)
  {
      struct kszphy_priv *lan8814 = phydev->priv;

+    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);
+
      /* Disable ANEG with QSGMII PCS Host side */
      lanphy_modify_page_reg(phydev, LAN8814_PAGE_PORT_REGS,
                     LAN8814_QSGMII_PCS1G_ANEG_CONFIG,
@@ -4190,13 +4190,7 @@ static int lan8814_probe(struct phy_device *phydev)
      devm_phy_package_join(&phydev->mdio.dev, phydev,
                    addr, sizeof(struct lan8814_shared_priv));

-    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);
-
+    if (phy_package_probe_once(phydev)) {
          err = lan8814_release_coma_mode(phydev);
          if (err)
              return err;
--
cgit 1.3-korg

Ce message électronique et ses pièces jointes sont confidentiels. Ils sont destinés exclusivement à la personne ou à l'entité à qui ils sont adressés.
Si vous avez reçu ce message par erreur, veuillez en informer immédiatement l'expéditeur et le supprimer de votre système.
Toute divulgation, distribution ou copie non autorisée de ce message ou de son contenu est interdite.
L'entreprise décline toute responsabilité en cas de transmission de virus ou de toute autre contamination liée à cet email.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-03 15:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-29  9:43 [PATCH 6.12.y] net: phy: micrel: fix LAN8814 QSGMII soft reset Joël ESPONDE
2026-06-03 15:13 ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox