1
0
Fork 0
alistair23-linux/drivers/net/dsa
Rasmus Villemoes 87fe04367d net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext
mv88e6xxx_port_vlan_join checks whether the VTU already contains an
entry for the given vid (via mv88e6xxx_vtu_getnext), and if so, merely
changes the relevant .member[] element and loads the updated entry
into the VTU.

However, at least for the mv88e6250, the on-stack struct
mv88e6xxx_vtu_entry vlan never has its .state[] array explicitly
initialized, neither in mv88e6xxx_port_vlan_join() nor inside the
getnext implementation. So the new entry has random garbage for the
STU bits, breaking VLAN filtering.

When the VTU entry is initially created, those bits are all zero, and
we should make sure to keep them that way when the entry is updated.

Fixes: 92307069a9 (net: dsa: mv88e6xxx: Avoid VTU corruption on 6097)
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Tobias Waldekranz <tobias@waldekranz.com>
Tested-by: Tobias Waldekranz <tobias@waldekranz.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-18 13:04:28 -08:00
..
b53 net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
hirschmann net: dsa: fix led_classdev build errors 2021-01-06 16:17:14 -08:00
microchip net: dsa: microchip: ksz8795: use num_vlans where possible 2020-12-02 17:16:29 -08:00
mv88e6xxx net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext 2021-01-18 13:04:28 -08:00
ocelot Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-11 22:29:38 -08:00
qca net: dsa: qca: ar9331: fix sleeping function called from invalid context bug 2020-12-16 10:57:35 -08:00
sja1105 net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
Kconfig net: dsa: Add DSA driver for Hirschmann Hellcreek switches 2020-11-05 14:04:49 -08:00
Makefile net: dsa: Add DSA driver for Hirschmann Hellcreek switches 2020-11-05 14:04:49 -08:00
bcm_sf2.c net: dsa: bcm_sf2: make const array static, makes object smaller 2020-10-20 20:57:57 -07:00
bcm_sf2.h net: dsa: bcm_sf2: recalculate switch clock rate based on ports 2020-09-03 15:08:03 -07:00
bcm_sf2_cfp.c net: dsa: bcm_sf2: Pass GENMASK() signed bits 2020-07-05 15:45:38 -07:00
bcm_sf2_regs.h Revert "net: dsa: bcm_sf2: Also configure Port 5 for 2Gb/sec on 7278" 2020-02-26 16:33:35 -08:00
dsa_loop.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
dsa_loop.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dsa_loop_bdinfo.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
lan9303-core.c net: dsa: lan9303: fix variable 'res' set but not used 2020-07-05 15:48:19 -07:00
lan9303.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
lan9303_i2c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
lan9303_mdio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
lantiq_gswip.c net: dsa: lantiq_gswip: Exclude RMII from modes that report 1 GbE 2021-01-07 19:00:11 -08:00
lantiq_pce.h net: dsa: Use the correct style for SPDX License Identifier 2019-09-22 15:25:08 -07:00
mt7530.c net: dsa: mt7530: enable MTU normalization 2020-12-12 15:00:56 -08:00
mt7530.h net: dsa: mt7530: support setting ageing time 2020-12-08 16:18:26 -08:00
mv88e6060.c net: dsa: Get information about stacked DSA protocol 2020-01-08 16:01:13 -08:00
mv88e6060.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
qca8k.c net: dsa: qca8k: Fix port MTU setting 2020-11-02 15:14:59 -08:00
qca8k.h net: dsa: qca8k: Add 802.1q VLAN support 2020-08-03 15:45:39 -07:00
realtek-smi-core.c net: dsa: rtl8366rb: Roof MTU for switch 2020-10-10 11:25:05 -07:00
realtek-smi-core.h net: dsa: rtl8366rb: Roof MTU for switch 2020-10-10 11:25:05 -07:00
rtl8366.c net: dsa: simplify the return rtl8366_vlan_prepare() 2020-12-09 17:05:37 -08:00
rtl8366rb.c net: dsa: rtl8366rb: Roof MTU for switch 2020-10-10 11:25:05 -07:00
vitesse-vsc73xx-core.c net: dsa: vsc73xx: make the MTU configurable 2020-03-27 16:07:25 -07:00
vitesse-vsc73xx-platform.c net: dsa: vitesse-vsc73xx: Convert to plain comments to avoid kerneldoc warnings 2020-07-05 15:49:03 -07:00
vitesse-vsc73xx-spi.c net: dsa: vitesse-vsc73xx: Convert to plain comments to avoid kerneldoc warnings 2020-07-05 15:49:03 -07:00
vitesse-vsc73xx.h net: dsa: vsc73xx: Split vsc73xx driver 2019-07-07 14:16:32 -07:00