mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
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: ece1950283 ("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>
This commit is contained in:
committed by
Jakub Kicinski
parent
ad17e7e92a
commit
96a9178a29
@@ -4380,12 +4380,6 @@ static int lan8814_config_init(struct phy_device *phydev)
|
|||||||
{
|
{
|
||||||
struct kszphy_priv *lan8814 = phydev->priv;
|
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 */
|
/* Disable ANEG with QSGMII PCS Host side */
|
||||||
lanphy_modify_page_reg(phydev, LAN8814_PAGE_PORT_REGS,
|
lanphy_modify_page_reg(phydev, LAN8814_PAGE_PORT_REGS,
|
||||||
LAN8814_QSGMII_PCS1G_ANEG_CONFIG,
|
LAN8814_QSGMII_PCS1G_ANEG_CONFIG,
|
||||||
@@ -4471,6 +4465,12 @@ static int lan8814_probe(struct phy_device *phydev)
|
|||||||
addr, sizeof(struct lan8814_shared_priv));
|
addr, sizeof(struct lan8814_shared_priv));
|
||||||
|
|
||||||
if (phy_package_init_once(phydev)) {
|
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);
|
err = lan8814_release_coma_mode(phydev);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
Reference in New Issue
Block a user