diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2020-01-08 08:06:05 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-09 03:01:13 +0300 |
commit | 4d776482ecc689bdd68627985ac4cb5a6f325953 (patch) | |
tree | 799ed8d4daa1e725790048d6b994f3e28647bc6f /drivers/net/dsa/qca | |
parent | 8d2ff126536320f7243bd05a69703c9b4cd7e46e (diff) | |
download | linux-4d776482ecc689bdd68627985ac4cb5a6f325953.tar.xz |
net: dsa: Get information about stacked DSA protocol
It is possible to stack multiple DSA switches in a way that they are not
part of the tree (disjoint) but the DSA master of a switch is a DSA
slave of another. When that happens switch drivers may have to know this
is the case so as to determine whether their tagging protocol has a
remove chance of working.
This is useful for specific switch drivers such as b53 where devices
have been known to be stacked in the wild without the Broadcom tag
protocol supporting that feature. This allows b53 to continue supporting
those devices by forcing the disabling of Broadcom tags on the outermost
switches if necessary.
The get_tag_protocol() function is therefore updated to gain an
additional enum dsa_tag_protocol argument which denotes the current
tagging protocol used by the DSA master we are attached to, else
DSA_TAG_PROTO_NONE for the top of the dsa_switch_tree.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/qca')
-rw-r--r-- | drivers/net/dsa/qca/ar9331.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index da3bece75e21..de25f99e995a 100644 --- a/drivers/net/dsa/qca/ar9331.c +++ b/drivers/net/dsa/qca/ar9331.c @@ -347,7 +347,8 @@ static void ar9331_sw_port_disable(struct dsa_switch *ds, int port) } static enum dsa_tag_protocol ar9331_sw_get_tag_protocol(struct dsa_switch *ds, - int port) + int port, + enum dsa_tag_protocol m) { return DSA_TAG_PROTO_AR9331; } |