diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-03-02 21:14:17 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-03-03 14:15:31 +0000 |
commit | ac45520960234cfa4be89b5aa072ac0fc7e57c07 (patch) | |
tree | 30247092495e3758a688f96dc30c4bf53eeaa0d0 /drivers/net/ethernet/mscc/ocelot.c | |
parent | 0cc369800e5fcba2b53a18fb24ff2036c8240868 (diff) | |
download | linux-stable-ac45520960234cfa4be89b5aa072ac0fc7e57c07.tar.gz linux-stable-ac45520960234cfa4be89b5aa072ac0fc7e57c07.tar.bz2 linux-stable-ac45520960234cfa4be89b5aa072ac0fc7e57c07.zip |
net: mscc: ocelot: accept configuring bridge port flags on the NPI port
In order for the Felix DSA driver to be able to turn on/off flooding
towards its CPU port, we need to redirect calls on the NPI port to
actually act upon the index in the analyzer block that corresponds to
the CPU port module. This was never necessary until now because DSA
(or the bridge) never called ocelot_port_bridge_flags() for the NPI
port.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot.c')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c index 0af321f6fb54..21134125a6e4 100644 --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c @@ -2886,6 +2886,9 @@ EXPORT_SYMBOL(ocelot_port_pre_bridge_flags); void ocelot_port_bridge_flags(struct ocelot *ocelot, int port, struct switchdev_brport_flags flags) { + if (port == ocelot->npi) + port = ocelot->num_phys_ports; + if (flags.mask & BR_LEARNING) ocelot_port_set_learning(ocelot, port, !!(flags.val & BR_LEARNING)); |