aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti
diff options
context:
space:
mode:
authorMugunthan V N <mugunthanvnm@ti.com>2014-06-18 07:51:48 -0400
committerDavid S. Miller <davem@davemloft.net>2014-06-21 20:17:39 -0400
commite6afea0bbf129f88dc3fc39fd0d769f9ff064172 (patch)
tree5756e77a38941017a8c64b42b846c317b662081a /drivers/net/ethernet/ti
parent7f082319190bce121c9774956861c2457535ef2d (diff)
drivers: net: cpsw: fix dual EMAC stall when connected to same switch
In commit 629c9a8fd0bbdfc6d702526b327470166ec39c6b (drivers: net: cpsw: Add default vlan for dual emac case also), api cpsw_add_default_vlan() also changes the port vlan which is required to seperate the ports which results in the following behavior In Dual EMAC mode, when both the Etnernet connected is connected to same switch, it creates a loop in the switch and when a broadcast packet is received it is forwarded to the other port which stalls the whole switch and needs a reset/power cycle to the switch to recover. So intead of using the api, add only the default VLAN entry in dual EMAC case. Cc: Yegor Yefremov <yegorslists@googlemail.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Tested-by: Yegor Yefremov <yegorslists@googlemail.com> Tested-by: Felipe Balbi <balbi@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r--drivers/net/ethernet/ti/cpsw.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index ff380dac6629..b988d16cd34e 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1212,7 +1212,12 @@ static int cpsw_ndo_open(struct net_device *ndev)
1212 for_each_slave(priv, cpsw_slave_open, priv); 1212 for_each_slave(priv, cpsw_slave_open, priv);
1213 1213
1214 /* Add default VLAN */ 1214 /* Add default VLAN */
1215 cpsw_add_default_vlan(priv); 1215 if (!priv->data.dual_emac)
1216 cpsw_add_default_vlan(priv);
1217 else
1218 cpsw_ale_add_vlan(priv->ale, priv->data.default_vlan,
1219 ALE_ALL_PORTS << priv->host_port,
1220 ALE_ALL_PORTS << priv->host_port, 0, 0);
1216 1221
1217 if (!cpsw_common_res_usage_state(priv)) { 1222 if (!cpsw_common_res_usage_state(priv)) {
1218 /* setup tx dma to fixed prio and zero offset */ 1223 /* setup tx dma to fixed prio and zero offset */