diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2019-02-20 10:32:52 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-20 11:08:26 -0800 |
commit | 9c2054a5cf415a9dc32c91ffde78399955deb571 (patch) | |
tree | 4fa8aab08a35522a43f1e4af0e124b5e81ba487f /net/compat.c | |
parent | 40e196a906d969fd10d885c692d2674b3d657006 (diff) | |
download | linux-9c2054a5cf415a9dc32c91ffde78399955deb571.tar.gz linux-9c2054a5cf415a9dc32c91ffde78399955deb571.tar.bz2 linux-9c2054a5cf415a9dc32c91ffde78399955deb571.zip |
net: dsa: fix unintended change of bridge interface STP state
When a DSA port is added to a bridge and brought up, the resulting STP
state programmed into the hardware depends on the order that these
operations are performed. However, the Linux bridge code believes that
the port is in disabled mode.
If the DSA port is first added to a bridge and then brought up, it will
be in blocking mode. If it is brought up and then added to the bridge,
it will be in disabled mode.
This difference is caused by DSA always setting the STP mode in
dsa_port_enable() whether or not this port is part of a bridge. Since
bridge always sets the STP state when the port is added, brought up or
taken down, it is unnecessary for us to manipulate the STP state.
Apparently, this code was copied from Rocker, and the very next day a
similar fix for Rocker was merged but was not propagated to DSA. See
e47172ab7e41 ("rocker: put port in FORWADING state after leaving bridge")
Fixes: b73adef67765 ("net: dsa: integrate with SWITCHDEV for HW bridging")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/compat.c')
0 files changed, 0 insertions, 0 deletions