Message ID | 20220523104256.3556016-7-olteanv@gmail.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | DSA changes for multiple CPU ports (part 3) | expand |
On 5/23/22 03:42, Vladimir Oltean wrote: > From: Vladimir Oltean <vladimir.oltean@nxp.com> > > 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>
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 0455fb3cf03d..c0be747c66ac 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -2848,6 +2848,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); }