linux_old1/net/dsa
Russell King 9c2054a5cf 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
e47172ab7e ("rocker: put port in FORWADING state after leaving bridge")

Fixes: b73adef677 ("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>
2019-02-20 11:08:26 -08:00
..
Kconfig net: dsa: ksz: Rename NET_DSA_TAG_KSZ to _KSZ9477 2018-12-16 14:23:33 -08:00
Makefile net: dsa: Add Lantiq / Intel GSWIP tag support 2018-09-13 08:14:33 -07:00
dsa.c net: dsa: ksz: Rename NET_DSA_TAG_KSZ to _KSZ9477 2018-12-16 14:23:33 -08:00
dsa2.c net: dsa: Remove VLA usage 2018-07-18 15:08:31 -07:00
dsa_priv.h net: dsa: ksz: Rename NET_DSA_TAG_KSZ to _KSZ9477 2018-12-16 14:23:33 -08:00
legacy.c net: dsa: legacy: simplify getting .driver_data 2018-10-22 19:49:04 -07:00
master.c net: dsa: Fix lockdep false positive splat 2019-02-04 18:30:43 -08:00
port.c net: dsa: fix unintended change of bridge interface STP state 2019-02-20 11:08:26 -08:00
slave.c net: dsa: Fix NULL checking in dsa_slave_set_eee() 2019-02-06 13:42:54 -08:00
switch.c net: dsa: Remove VLA usage 2018-07-18 15:08:31 -07:00
tag_brcm.c net: dsa: Add overhead to tag protocol ops. 2018-12-06 12:18:16 -08:00
tag_dsa.c net: dsa: Add overhead to tag protocol ops. 2018-12-06 12:18:16 -08:00
tag_edsa.c net: dsa: Add overhead to tag protocol ops. 2018-12-06 12:18:16 -08:00
tag_gswip.c net: dsa: Add overhead to tag protocol ops. 2018-12-06 12:18:16 -08:00
tag_ksz.c net: dsa: ksz: Add STP multicast handling 2018-12-16 14:23:33 -08:00
tag_lan9303.c net: dsa: Add overhead to tag protocol ops. 2018-12-06 12:18:16 -08:00
tag_mtk.c net: dsa: Add overhead to tag protocol ops. 2018-12-06 12:18:16 -08:00
tag_qca.c net: dsa: Add overhead to tag protocol ops. 2018-12-06 12:18:16 -08:00
tag_trailer.c net: dsa: Add overhead to tag protocol ops. 2018-12-06 12:18:16 -08:00