diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-08-19 20:48:16 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-08-23 11:39:22 +0200 |
commit | 7136097e11996417da59c67682694d8a5a7f3f4b (patch) | |
tree | 76a4a56f57b8def967bfc1217ee94eaede915fae /net/dsa | |
parent | 4f03dcc6b9a0734d755601002e33adbd42469b47 (diff) | |
download | linux-stable-7136097e11996417da59c67682694d8a5a7f3f4b.tar.gz linux-stable-7136097e11996417da59c67682694d8a5a7f3f4b.tar.bz2 linux-stable-7136097e11996417da59c67682694d8a5a7f3f4b.zip |
net: dsa: only bring down user ports assigned to a given DSA master
This is an adaptation of commit c0a8a9c27493 ("net: dsa: automatically
bring user ports down when master goes down") for multiple DSA masters.
When a DSA master goes down, only the user ports under its control
should go down too, the others can still send/receive traffic.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/slave.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index d0ffa642106f..b24f1131af90 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -2873,6 +2873,9 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb, if (!dsa_port_is_user(dp)) continue; + if (dp->cpu_dp != cpu_dp) + continue; + list_add(&dp->slave->close_list, &close_list); } |