ramips: prevent packet forwarding on mt7620 between switch ports during init (FS...
[openwrt/openwrt.git] / target / linux / ramips / patches-4.4 / 0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
index 3ae5f5136355baffcc986824693d6323479621e2..4dee81d2e40f2b7b0e612983ea04f64956910e6f 100644 (file)
@@ -61,7 +61,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
        GSW_ATTR_ENABLE_VLAN,
 --- /dev/null
 +++ b/drivers/net/ethernet/mediatek/mt7530.c
-@@ -0,0 +1,884 @@
+@@ -0,0 +1,886 @@
 +/*
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
@@ -555,7 +555,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +
 +      if (!priv->global_vlan_enable) {
 +              for (i = 0; i < MT7530_NUM_PORTS; i++)
-+                      mt7530_w32(priv, REG_ESW_PORT_PCR(i), 0x00ff0000);
++                      mt7530_w32(priv, REG_ESW_PORT_PCR(i), 0x00400000);
++
++              mt7530_w32(priv, REG_ESW_PORT_PCR(MT7530_CPU_PORT), 0x00ff0000);
 +
 +              for (i = 0; i < MT7530_NUM_PORTS; i++)
 +                      mt7530_w32(priv, REG_ESW_PORT_PVC(i), 0x810000c0);