mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net] net: phy: micrel: lan8814 fix reset of the QSGMII interface
@ 2025-11-06  9:06 Horatiu Vultur
  2025-11-06 13:21 ` Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Horatiu Vultur @ 2025-11-06  9:06 UTC (permalink / raw)
  To: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni, Divya.Koppera
  Cc: netdev, linux-kernel, Horatiu Vultur

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>
---
 drivers/net/phy/micrel.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 6a1a424e3b30f..01c87c9b77020 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -4380,12 +4380,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_PORT_REGS,
 			       LAN8814_QSGMII_PCS1G_ANEG_CONFIG,
@@ -4471,6 +4465,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;
-- 
2.34.1


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

* Re: [PATCH net] net: phy: micrel: lan8814 fix reset of the QSGMII interface
  2025-11-06  9:06 [PATCH net] net: phy: micrel: lan8814 fix reset of the QSGMII interface Horatiu Vultur
@ 2025-11-06 13:21 ` Andrew Lunn
  2025-11-06 14:07 ` Divya.Koppera
  2025-11-08  3:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2025-11-06 13:21 UTC (permalink / raw)
  To: Horatiu Vultur
  Cc: hkallweit1, linux, davem, edumazet, kuba, pabeni, Divya.Koppera,
	netdev, linux-kernel

On Thu, Nov 06, 2025 at 10:06:37AM +0100, Horatiu Vultur wrote:
> 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>

    Andrew

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

* RE: [PATCH net] net: phy: micrel: lan8814 fix reset of the QSGMII interface
  2025-11-06  9:06 [PATCH net] net: phy: micrel: lan8814 fix reset of the QSGMII interface Horatiu Vultur
  2025-11-06 13:21 ` Andrew Lunn
@ 2025-11-06 14:07 ` Divya.Koppera
  2025-11-08  3:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Divya.Koppera @ 2025-11-06 14:07 UTC (permalink / raw)
  To: Horatiu.Vultur, andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni
  Cc: netdev, linux-kernel, Horatiu.Vultur



> -----Original Message-----
> From: Horatiu Vultur <horatiu.vultur@microchip.com>
> Sent: Thursday, November 6, 2025 2:37 PM
> To: andrew@lunn.ch; hkallweit1@gmail.com; linux@armlinux.org.uk;
> davem@davemloft.net; edumazet@google.com; kuba@kernel.org;
> pabeni@redhat.com; Divya Koppera - I30481
> <Divya.Koppera@microchip.com>
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Horatiu Vultur -
> M31836 <Horatiu.Vultur@microchip.com>
> Subject: [PATCH net] 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>
> ---
>  drivers/net/phy/micrel.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index
> 6a1a424e3b30f..01c87c9b77020 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -4380,12 +4380,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_PORT_REGS,
>  			       LAN8814_QSGMII_PCS1G_ANEG_CONFIG, @@ -
> 4471,6 +4465,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;
> --
> 2.34.1
Reviewed-by: Divya Koppera <Divya.Koppera@microchip.com >


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

* Re: [PATCH net] net: phy: micrel: lan8814 fix reset of the QSGMII interface
  2025-11-06  9:06 [PATCH net] net: phy: micrel: lan8814 fix reset of the QSGMII interface Horatiu Vultur
  2025-11-06 13:21 ` Andrew Lunn
  2025-11-06 14:07 ` Divya.Koppera
@ 2025-11-08  3:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-08  3:10 UTC (permalink / raw)
  To: Horatiu Vultur
  Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
	Divya.Koppera, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 6 Nov 2025 10:06:37 +0100 you wrote:
> 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>
> 
> [...]

Here is the summary with links:
  - [net] net: phy: micrel: lan8814 fix reset of the QSGMII interface
    https://git.kernel.org/netdev/net/c/96a9178a29a6

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-11-08  3:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-06  9:06 [PATCH net] net: phy: micrel: lan8814 fix reset of the QSGMII interface Horatiu Vultur
2025-11-06 13:21 ` Andrew Lunn
2025-11-06 14:07 ` Divya.Koppera
2025-11-08  3:10 ` patchwork-bot+netdevbpf

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

all inboxes | Powered by JetHome®