All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2 1/1] net: dsa: microchip: Correct initialization order for KSZ88x3 ports
@ 2024-05-17  5:01 Oleksij Rempel
  2024-05-17  8:07 ` Arun.Ramadoss
  2024-05-17 20:38 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Oleksij Rempel @ 2024-05-17  5:01 UTC (permalink / raw)
  To: David S. Miller, Andrew Lunn, Eric Dumazet, Florian Fainelli,
	Jakub Kicinski, Paolo Abeni, Vladimir Oltean, Woojung Huh,
	Arun Ramadoss
  Cc: Oleksij Rempel, Hariprasad Kelam, kernel, linux-kernel, netdev,
	UNGLinuxDriver, David Ahern, Simon Horman, Willem de Bruijn,
	Søren Andersen

Adjust the initialization sequence of KSZ88x3 switches to enable
802.1p priority control on Port 2 before configuring Port 1. This
change ensures the apptrust functionality on Port 1 operates
correctly, as it depends on the priority settings of Port 2. The
prior initialization sequence incorrectly configured Port 1 first,
which could lead to functional discrepancies.

Fixes: a1ea57710c9d ("net: dsa: microchip: dcb: add special handling for KSZ88X3 family")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Hariprasad Kelam <hkelam@marvell.com>
---
 drivers/net/dsa/microchip/ksz_dcb.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/dsa/microchip/ksz_dcb.c b/drivers/net/dsa/microchip/ksz_dcb.c
index a971063275629..086bc9b3cf536 100644
--- a/drivers/net/dsa/microchip/ksz_dcb.c
+++ b/drivers/net/dsa/microchip/ksz_dcb.c
@@ -805,5 +805,15 @@ int ksz_dcb_init(struct ksz_device *dev)
 	if (ret)
 		return ret;
 
+	/* Enable 802.1p priority control on Port 2 during switch initialization.
+	 * This setup is critical for the apptrust functionality on Port 1, which
+	 * relies on the priority settings of Port 2. Note: Port 1 is naturally
+	 * configured before Port 2, necessitating this configuration order.
+	 */
+	if (ksz_is_ksz88x3(dev))
+		return ksz_prmw8(dev, KSZ_PORT_2, KSZ8_REG_PORT_1_CTRL_0,
+				 KSZ8_PORT_802_1P_ENABLE,
+				 KSZ8_PORT_802_1P_ENABLE);
+
 	return 0;
 }
-- 
2.39.2


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

* Re: [PATCH net v2 1/1] net: dsa: microchip: Correct initialization order for KSZ88x3 ports
  2024-05-17  5:01 [PATCH net v2 1/1] net: dsa: microchip: Correct initialization order for KSZ88x3 ports Oleksij Rempel
@ 2024-05-17  8:07 ` Arun.Ramadoss
  2024-05-17 20:38 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Arun.Ramadoss @ 2024-05-17  8:07 UTC (permalink / raw)
  To: andrew, olteanv, davem, Woojung.Huh, pabeni, o.rempel, edumazet,
	f.fainelli, kuba
  Cc: kernel, dsahern, san, willemb, linux-kernel, hkelam, netdev,
	horms, UNGLinuxDriver

On Fri, 2024-05-17 at 07:01 +0200, Oleksij Rempel wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> Adjust the initialization sequence of KSZ88x3 switches to enable
> 802.1p priority control on Port 2 before configuring Port 1. This
> change ensures the apptrust functionality on Port 1 operates
> correctly, as it depends on the priority settings of Port 2. The
> prior initialization sequence incorrectly configured Port 1 first,
> which could lead to functional discrepancies.
> 
> Fixes: a1ea57710c9d ("net: dsa: microchip: dcb: add special handling
> for KSZ88X3 family")
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> Reviewed-by: Hariprasad Kelam <hkelam@marvell.com>

Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>


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

* Re: [PATCH net v2 1/1] net: dsa: microchip: Correct initialization order for KSZ88x3 ports
  2024-05-17  5:01 [PATCH net v2 1/1] net: dsa: microchip: Correct initialization order for KSZ88x3 ports Oleksij Rempel
  2024-05-17  8:07 ` Arun.Ramadoss
@ 2024-05-17 20:38 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-05-17 20:38 UTC (permalink / raw)
  To: Oleksij Rempel
  Cc: davem, andrew, edumazet, f.fainelli, kuba, pabeni, olteanv,
	woojung.huh, arun.ramadoss, hkelam, kernel, linux-kernel, netdev,
	UNGLinuxDriver, dsahern, horms, willemb, san

Hello:

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

On Fri, 17 May 2024 07:01:21 +0200 you wrote:
> Adjust the initialization sequence of KSZ88x3 switches to enable
> 802.1p priority control on Port 2 before configuring Port 1. This
> change ensures the apptrust functionality on Port 1 operates
> correctly, as it depends on the priority settings of Port 2. The
> prior initialization sequence incorrectly configured Port 1 first,
> which could lead to functional discrepancies.
> 
> [...]

Here is the summary with links:
  - [net,v2,1/1] net: dsa: microchip: Correct initialization order for KSZ88x3 ports
    https://git.kernel.org/netdev/net/c/f0fa84116434

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] 3+ messages in thread

end of thread, other threads:[~2024-05-17 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-17  5:01 [PATCH net v2 1/1] net: dsa: microchip: Correct initialization order for KSZ88x3 ports Oleksij Rempel
2024-05-17  8:07 ` Arun.Ramadoss
2024-05-17 20:38 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.