Commit 087edfb40a0efce6de24ad824e1aa971ed86b9b1
1 parent
167a47470b
Exists in
smarc-ti-linux-3.12.10
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.
Showing 1 changed file with 6 additions and 1 deletions Side-by-side Diff
drivers/net/ethernet/ti/cpsw.c
... | ... | @@ -1247,7 +1247,12 @@ |
1247 | 1247 | /* Add default VLAN */ |
1248 | 1248 | /* if (!priv->data.dual_emac) |
1249 | 1249 | cpsw_add_default_vlan(priv);*/ |
1250 | - cpsw_add_default_vlan(priv); | |
1250 | + if (!priv->data.dual_emac) | |
1251 | + cpsw_add_default_vlan(priv); | |
1252 | + else | |
1253 | + cpsw_ale_add_vlan(priv->ale, priv->data.default_vlan, | |
1254 | + ALE_ALL_PORTS << priv->host_port, | |
1255 | + ALE_ALL_PORTS << priv->host_port, 0, 0); | |
1251 | 1256 | |
1252 | 1257 | if (!cpsw_common_res_usage_state(priv)) { |
1253 | 1258 | /* setup tx dma to fixed prio and zero offset */ |