Skip to content

Commit

Permalink
net: dsa: assign a CPU port to DSA port
Browse files Browse the repository at this point in the history
DSA ports also need to have a dedicated CPU port assigned to them,
because they need to know where to egress frames targeting the CPU,
e.g. To_Cpu frames received on a Marvell Tag port.

Signed-off-by: Vivien Didelot <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
vivien authored and davem330 committed Dec 5, 2017
1 parent 0ea54dd commit 986d7cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/dsa2.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static int dsa_tree_setup_default_cpu(struct dsa_switch_tree *dst)
for (port = 0; port < ds->num_ports; port++) {
dp = &ds->ports[port];

if (dsa_port_is_user(dp))
if (dsa_port_is_user(dp) || dsa_port_is_dsa(dp))
dp->cpu_dp = dst->cpu_dp;
}
}
Expand Down

0 comments on commit 986d7cc

Please sign in to comment.