diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-08-19 20:48:17 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-08-23 12:39:22 +0300 |
commit | f41ec1fd1c20e2a4e60a4ab8490b3e63423c0a8a (patch) | |
tree | e2e9449a4e2d00fc97007b57303773b2311b648a /net/dsa/dsa_priv.h | |
parent | 7136097e11996417da59c67682694d8a5a7f3f4b (diff) | |
download | linux-f41ec1fd1c20e2a4e60a4ab8490b3e63423c0a8a.tar.xz |
net: dsa: all DSA masters must be down when changing the tagging protocol
The fact that the tagging protocol is set and queried from the
/sys/class/net/<dsa-master>/dsa/tagging file is a bit of a quirk from
the single CPU port days which isn't aging very well now that DSA can
have more than a single CPU port. This is because the tagging protocol
is a switch property, yet in the presence of multiple CPU ports it can
be queried and set from multiple sysfs files, all of which are handled
by the same implementation.
The current logic ensures that the net device whose sysfs file we're
changing the tagging protocol through must be down. That net device is
the DSA master, and this is fine for single DSA master / CPU port setups.
But exactly because the tagging protocol is per switch [ tree, in fact ]
and not per DSA master, this isn't fine any longer with multiple CPU
ports, and we must iterate through the tree and find all DSA masters,
and make sure that all of them are down.
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/dsa_priv.h')
-rw-r--r-- | net/dsa/dsa_priv.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index 8924366467e0..614fbba8fe39 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa/dsa_priv.h @@ -545,7 +545,6 @@ struct dsa_lag *dsa_tree_lag_find(struct dsa_switch_tree *dst, int dsa_tree_notify(struct dsa_switch_tree *dst, unsigned long e, void *v); int dsa_broadcast(unsigned long e, void *v); int dsa_tree_change_tag_proto(struct dsa_switch_tree *dst, - struct net_device *master, const struct dsa_device_ops *tag_ops, const struct dsa_device_ops *old_tag_ops); void dsa_tree_master_admin_state_change(struct dsa_switch_tree *dst, |