Skip to content

Commit

Permalink
net: dsa: only bring down user ports assigned to a given DSA master
Browse files Browse the repository at this point in the history
This is an adaptation of commit c0a8a9c ("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>
  • Loading branch information
Vladimir Oltean authored and Paolo Abeni committed Aug 23, 2022
1 parent 4f03dcc commit 7136097
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/dsa/slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 7136097

Please sign in to comment.