Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stintel/ad4b370f49c6e451539c8508776bd454 to your computer and use it in GitHub Desktop.
Save stintel/ad4b370f49c6e451539c8508776bd454 to your computer and use it in GitHub Desktop.
0002-realtek-fix-VLAN-tagging-on-RTL8390-and-RTL9300.patch
From 26d16b67ce7ef6ec48ec60797566922241b19af2 Mon Sep 17 00:00:00 2001
From: Stijn Tintel <[email protected]>
Date: Wed, 20 Oct 2021 21:57:55 +0300
Subject: [PATCH 2/2] realtek: fix VLAN tagging on RTL8390 and RTL9300
Signed-off-by: Stijn Tintel <[email protected]>
---
target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
index a17208b72b..d2a87e9ee1 100644
--- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
@@ -888,7 +888,9 @@ static int rtl83xx_port_enable(struct dsa_switch *ds, int port,
/* enable inner tagging on egress, do not keep any tags */
if (priv->family_id == RTL9310_FAMILY_ID)
- sw_w32(BIT(4), priv->r->vlan_port_tag_sts_ctrl + (port << 2));
+ sw_w32(0x1 << 10, priv->r->vlan_port_tag_sts_ctrl + (port << 2));
+ else if (priv->family_id == RTL8390_FAMILY_ID || priv->family_id == RTL9300_FAMILY_ID)
+ sw_w32(0x1 << 4, priv->r->vlan_port_tag_sts_ctrl + (port << 2));
else
sw_w32(1, priv->r->vlan_port_tag_sts_ctrl + (port << 2));
--
2.32.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment