diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-07-13 12:37:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-13 09:32:41 -0700 |
commit | b0b33b048dcfbd7da82c3cde4fab02751dfab4d6 (patch) | |
tree | de3dbb8667d09b9e30d0bfe93a7a4a4dd39e10f1 /drivers/s390 | |
parent | e56c6bbd98dc1cefb6f9c5d795fd29016e4f2fe7 (diff) | |
download | linux-stable-b0b33b048dcfbd7da82c3cde4fab02751dfab4d6.tar.gz linux-stable-b0b33b048dcfbd7da82c3cde4fab02751dfab4d6.tar.bz2 linux-stable-b0b33b048dcfbd7da82c3cde4fab02751dfab4d6.zip |
net: dsa: sja1105: fix address learning getting disabled on the CPU port
In May 2019 when commit 640f763f98c2 ("net: dsa: sja1105: Add support
for Spanning Tree Protocol") was introduced, the comment that "STP does
not get called for the CPU port" was true. This changed after commit
0394a63acfe2 ("net: dsa: enable and disable all ports") in August 2019
and went largely unnoticed, because the sja1105_bridge_stp_state_set()
method did nothing different compared to the static setup done by
sja1105_init_mac_settings().
With the ability to turn address learning off introduced by the blamed
commit, there is a new priv->learn_ena port mask in the driver. When
sja1105_bridge_stp_state_set() gets called and we are in
BR_STATE_LEARNING or later, address learning is enabled or not depending
on priv->learn_ena & BIT(port).
So what happens is that priv->learn_ena is not being set from anywhere
for the CPU port, and the static configuration done by
sja1105_init_mac_settings() is being overwritten.
To solve this, acknowledge that the static configuration of STP state is
no longer necessary because the STP state is being set by the DSA core
now, but what is necessary is to set priv->learn_ena for the CPU port.
Fixes: 4d9423549501 ("net: dsa: sja1105: offload bridge port flags to device")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
0 files changed, 0 insertions, 0 deletions