Fix GSW to set more predictable state after init and swconfig reset.
mt7620 tested. mt7621 need check.
Signed-off-by:Serge Vasilugin <vasilu...@yandex.ru>
diff --git a/target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch b/target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch
index 4055026..b51c709 100644
--- a/target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch
+++ b/target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch
@@ -285,7 +285,7 @@
+ mt7530_probe(priv->device, gsw->base, NULL, 0);
+ mt7530_probe(priv->device, NULL, priv->mii_bus, 1);
+ } else {
-+ mt7530_probe(priv->device, gsw->base, NULL, 1);
++ mt7530_probe(priv->device, gsw->base, NULL, 0); /* always ignore vlan */
+ }
+
+ return 0;
diff --git a/target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch b/target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch
index 4014539..a5516d2 100644
--- a/target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch
+++ b/target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch
@@ -107,7 +107,7 @@
+static int mt7621_gsw_config(struct fe_priv *priv)
+{
+ if (priv->mii_bus && priv->mii_bus->phy_map[0x1f])
-+ mt7530_probe(priv->device, NULL, priv->mii_bus, 1);
++ mt7530_probe(priv->device, NULL, priv->mii_bus, 0); /* always igrnore vlan */
+
+ return 0;
+}
diff --git a/target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch b/target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
index bbad8cc..554ef26 100644
--- a/target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
+++ b/target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
@@ -281,6 +281,7 @@
+
+ memset(priv->port_entries, 0, sizeof(priv->port_entries));
+ memset(priv->vlan_entries, 0, sizeof(priv->vlan_entries));
++ priv->global_vlan_enable = 0;
+
+ /* set default vid of each vlan to the same number of vlan, so the vid
+ * won't need be set explicitly.
mt7620 tested. mt7621 need check.
Signed-off-by:Serge Vasilugin <vasilu...@yandex.ru>
diff --git a/target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch b/target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch
index 4055026..b51c709 100644
--- a/target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch
+++ b/target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch
@@ -285,7 +285,7 @@
+ mt7530_probe(priv->device, gsw->base, NULL, 0);
+ mt7530_probe(priv->device, NULL, priv->mii_bus, 1);
+ } else {
-+ mt7530_probe(priv->device, gsw->base, NULL, 1);
++ mt7530_probe(priv->device, gsw->base, NULL, 0); /* always ignore vlan */
+ }
+
+ return 0;
diff --git a/target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch b/target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch
index 4014539..a5516d2 100644
--- a/target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch
+++ b/target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch
@@ -107,7 +107,7 @@
+static int mt7621_gsw_config(struct fe_priv *priv)
+{
+ if (priv->mii_bus && priv->mii_bus->phy_map[0x1f])
-+ mt7530_probe(priv->device, NULL, priv->mii_bus, 1);
++ mt7530_probe(priv->device, NULL, priv->mii_bus, 0); /* always igrnore vlan */
+
+ return 0;
+}
diff --git a/target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch b/target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
index bbad8cc..554ef26 100644
--- a/target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
+++ b/target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
@@ -281,6 +281,7 @@
+
+ memset(priv->port_entries, 0, sizeof(priv->port_entries));
+ memset(priv->vlan_entries, 0, sizeof(priv->vlan_entries));
++ priv->global_vlan_enable = 0;
+
+ /* set default vid of each vlan to the same number of vlan, so the vid
+ * won't need be set explicitly.
---
serge
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel