Commit 674c396d5efdb82363e4310323e5d4240b9b013f
1 parent
6ac4cf06a8
Exists in
smarc-ti-linux-3.15.y
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
... | ... | @@ -1201,7 +1201,12 @@ |
1201 | 1201 | for_each_slave(priv, cpsw_slave_open, priv); |
1202 | 1202 | |
1203 | 1203 | /* Add default VLAN */ |
1204 | - cpsw_add_default_vlan(priv); | |
1204 | + if (!priv->data.dual_emac) | |
1205 | + cpsw_add_default_vlan(priv); | |
1206 | + else | |
1207 | + cpsw_ale_add_vlan(priv->ale, priv->data.default_vlan, | |
1208 | + ALE_ALL_PORTS << priv->host_port, | |
1209 | + ALE_ALL_PORTS << priv->host_port, 0, 0); | |
1205 | 1210 | |
1206 | 1211 | if (!cpsw_common_res_usage_state(priv)) { |
1207 | 1212 | /* setup tx dma to fixed prio and zero offset */ |