]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: phy: micrel: lan8814 fix reset of the QSGMII interface
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Thu, 6 Nov 2025 09:06:37 +0000 (10:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Nov 2025 09:37:28 +0000 (10:37 +0100)
[ Upstream commit 96a9178a29a6b84bb632ebeb4e84cf61191c73d5 ]

The lan8814 is a quad-phy and it is using QSGMII towards the MAC.
The problem is that everytime when one of the ports is configured then
the PCS is reseted for all the PHYs. Meaning that the other ports can
loose traffic until the link is establish again.
To fix this, do the reset one time for the entire PHY package.

Fixes: ece19502834d ("net: phy: micrel: 1588 support for LAN8814 phy")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Divya Koppera <Divya.Koppera@microchip.com >
Link: https://patch.msgid.link/20251106090637.2030625-1-horatiu.vultur@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/micrel.c

index 107e5c4c7da3be0cd16f59b17bbec434de2da4db..39d2cd7cf4382f46be21791e3d40dfad389e4f01 100644 (file)
@@ -4327,12 +4327,6 @@ static int lan8814_config_init(struct phy_device *phydev)
 {
        struct kszphy_priv *lan8814 = phydev->priv;
 
-       /* 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_COMMON_REGS,
                               LAN8814_QSGMII_PCS1G_ANEG_CONFIG,
@@ -4418,6 +4412,12 @@ static int lan8814_probe(struct phy_device *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);
+
                err = lan8814_release_coma_mode(phydev);
                if (err)
                        return err;