Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: micrel: lan8814 fix reset of the QSGMII interface

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>

authored by

Horatiu Vultur and committed by
Jakub Kicinski
96a9178a ad17e7e9

+6 -6
+6 -6
drivers/net/phy/micrel.c
··· 4380 4380 { 4381 4381 struct kszphy_priv *lan8814 = phydev->priv; 4382 4382 4383 - /* Reset the PHY */ 4384 - lanphy_modify_page_reg(phydev, LAN8814_PAGE_COMMON_REGS, 4385 - LAN8814_QSGMII_SOFT_RESET, 4386 - LAN8814_QSGMII_SOFT_RESET_BIT, 4387 - LAN8814_QSGMII_SOFT_RESET_BIT); 4388 - 4389 4383 /* Disable ANEG with QSGMII PCS Host side */ 4390 4384 lanphy_modify_page_reg(phydev, LAN8814_PAGE_PORT_REGS, 4391 4385 LAN8814_QSGMII_PCS1G_ANEG_CONFIG, ··· 4465 4471 addr, sizeof(struct lan8814_shared_priv)); 4466 4472 4467 4473 if (phy_package_init_once(phydev)) { 4474 + /* Reset the PHY */ 4475 + lanphy_modify_page_reg(phydev, LAN8814_PAGE_COMMON_REGS, 4476 + LAN8814_QSGMII_SOFT_RESET, 4477 + LAN8814_QSGMII_SOFT_RESET_BIT, 4478 + LAN8814_QSGMII_SOFT_RESET_BIT); 4479 + 4468 4480 err = lan8814_release_coma_mode(phydev); 4469 4481 if (err) 4470 4482 return err;