summaryrefslogtreecommitdiffstats
path: root/net/dsa/dsa2.c
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2017-12-05 21:34:12 +0100
committerDavid S. Miller <davem@davemloft.net>2017-12-06 00:01:34 +0100
commit986d7ccf7e4ba2bc0c0929acfe54b6d41dec0805 (patch)
tree16e38ec49bca917ddb7a494bdeb8a36ff16e4424 /net/dsa/dsa2.c
parentnet: dsa: mv88e6xxx: setup global upstream port (diff)
downloadlinux-986d7ccf7e4ba2bc0c0929acfe54b6d41dec0805.tar.xz
linux-986d7ccf7e4ba2bc0c0929acfe54b6d41dec0805.zip
net: dsa: assign a CPU port to DSA port
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 <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa2.c')
-rw-r--r--net/dsa/dsa2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 1e287420ff49..21f9bed11988 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -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;
}
}