[PATCH net-next v3 1/7] net: dsa: lantiq_gswip: clarify GSWIP 2.2 VLAN mode in comment

Daniel Golle posted 7 patches 3 months, 3 weeks ago
There is a newer version of this series
[PATCH net-next v3 1/7] net: dsa: lantiq_gswip: clarify GSWIP 2.2 VLAN mode in comment
Posted by Daniel Golle 3 months, 3 weeks ago
The comment above writing the default PVID incorrectly states that
"GSWIP 2.2 (GRX300) and later program here the VID directly."
The truth is that even GSWIP 2.2 and newer maintain the behavior of
GSWIP 2.1 unless the VLANMD bit in PCE Global Control Register 1 is
set ("GSWIP2.2 VLAN Mode").
Fix the misleading comment accordingly.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 drivers/net/dsa/lantiq/lantiq_gswip.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dsa/lantiq/lantiq_gswip.c b/drivers/net/dsa/lantiq/lantiq_gswip.c
index 25f6b46957a0..86b410a40d32 100644
--- a/drivers/net/dsa/lantiq/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq/lantiq_gswip.c
@@ -588,7 +588,11 @@ static void gswip_port_commit_pvid(struct gswip_priv *priv, int port)
 			  FIELD_PREP(GSWIP_PCE_VCTRL_VINR, vinr),
 			  GSWIP_PCE_VCTRL(port));
 
-	/* GSWIP 2.2 (GRX300) and later program here the VID directly. */
+	/* Note that in GSWIP 2.2 VLAN mode the VID needs to be programmed
+	 * directly instead of referencing the index in the Active VLAN Tablet.
+	 * However, without the VLANMD bit (9) in PCE_GCTRL_1 (0x457) even
+	 * GSWIP 2.2 and newer hardware maintain the GSWIP 2.1 behavior.
+	 */
 	gswip_switch_w(priv, idx, GSWIP_PCE_DEFPVID(port));
 }
 
-- 
2.51.1.dirty
Re: [PATCH net-next v3 1/7] net: dsa: lantiq_gswip: clarify GSWIP 2.2 VLAN mode in comment
Posted by Andrew Lunn 3 months, 2 weeks ago
On Sun, Oct 19, 2025 at 01:46:54PM +0100, Daniel Golle wrote:
61;8003;1c> The comment above writing the default PVID incorrectly states that
> "GSWIP 2.2 (GRX300) and later program here the VID directly."
> The truth is that even GSWIP 2.2 and newer maintain the behavior of
> GSWIP 2.1 unless the VLANMD bit in PCE Global Control Register 1 is
> set ("GSWIP2.2 VLAN Mode").
> Fix the misleading comment accordingly.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Re: [PATCH net-next v3 1/7] net: dsa: lantiq_gswip: clarify GSWIP 2.2 VLAN mode in comment
Posted by Daniel Golle 3 months, 2 weeks ago
Hi Andrew,

On Wed, Oct 22, 2025 at 04:29:26AM +0200, Andrew Lunn wrote:
> On Sun, Oct 19, 2025 at 01:46:54PM +0100, Daniel Golle wrote:
> 61;8003;1c> The comment above writing the default PVID incorrectly states that
> > "GSWIP 2.2 (GRX300) and later program here the VID directly."
> > The truth is that even GSWIP 2.2 and newer maintain the behavior of
> > GSWIP 2.1 unless the VLANMD bit in PCE Global Control Register 1 is
> > set ("GSWIP2.2 VLAN Mode").
> > Fix the misleading comment accordingly.
> > 
> > Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Thank you for reviewing, however, you've replied to the surperseded v3
submission while v5 is current. The patches for which you sent a
Reviewed-by:-tag have not changed since v3, except for 2/7 which is now
using the `REGMAP_UPSHIFT(2)` macro instead of `-2` as a plain number.
Would you mind sending the Reviewed-by:-tags again in reply to the v5[1]
patches?

Cheers

Daniel

[1]: https://patchwork.kernel.org/project/netdevbpf/list/?series=1013992