summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2025-10-21 14:16:30 +0300
committerJakub Kicinski <kuba@kernel.org>2025-10-24 04:53:05 +0300
commit41b66240e90b0dceb488ce5a4a285a97e6ca63c7 (patch)
treec0a8367a3f07d5e9e1a1e3b7ff016880374f48fe
parent05774d7e4201b673b415d65a1344dc396e7c00e1 (diff)
downloadlinux-41b66240e90b0dceb488ce5a4a285a97e6ca63c7.tar.xz
net: dsa: lantiq_gswip: clarify GSWIP 2.2 VLAN mode in comment
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> Acked-by; Hauke Mehrtens <hauke@hauke-m.de>: Acked-by; Hauke Mehrtens <hauke@hauke-m.de>: Link: https://patch.msgid.link/018056a575503d9797f3222f71a988e825316be0.1761045000.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/dsa/lantiq/lantiq_gswip.c6
1 files changed, 5 insertions, 1 deletions
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));
}