1
0
Fork 0
alistair23-linux/drivers/net/dsa/mv88e6xxx
Rasmus Villemoes fd2f5130ae net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext
commit 87fe04367d upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-27 11:47:52 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile net: dsa: mv88e6xxx: update code operating on hidden registers 2019-08-27 21:42:16 -07:00
chip.c net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset 2020-12-02 08:49:49 +01:00
chip.h net: dsa: mv88e6xxx: add RXNFC support 2019-09-10 16:53:31 +01:00
global1.c net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset 2020-12-02 08:49:49 +01:00
global1.h net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset 2020-12-02 08:49:49 +01:00
global1_atu.c net: dsa: mv88e6xxx: complete ATU state definitions 2019-09-10 16:53:31 +01:00
global1_vtu.c net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext 2021-01-27 11:47:52 +01:00
global2.c net: dsa: mv88e6xxx: fix lockup on warm boot 2020-03-18 07:17:40 +01:00
global2.h net: dsa: mv88e6xxx: remove wait and update routines 2019-08-11 21:27:15 -07:00
global2_avb.c net: dsa: mv88e6xxx: wait for AVB Busy bit 2019-08-11 21:27:15 -07:00
global2_scratch.c net: dsa: mv88e6xxx: remove wait and update routines 2019-08-11 21:27:15 -07:00
hwtstamp.c net: dsa: mv88e6xxx: introduce helpers for handling chip->reg_lock 2019-06-23 11:11:11 -07:00
hwtstamp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
phy.c net: dsa: mv88e6xxx: introduce helpers for handling chip->reg_lock 2019-06-23 11:11:11 -07:00
phy.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
port.c net: dsa: mv88e6xxx: force cmode write on 6141/6341 2020-01-12 12:21:50 +01:00
port.h net: dsa: mv88e6xxx: introduce .port_set_policy 2019-09-10 16:53:31 +01:00
port_hidden.c net: dsa: mv88e6xxx: update code operating on hidden registers 2019-08-27 21:42:16 -07:00
ptp.c mv88e6xxx: Reject requests to enable time stamping on both edges. 2019-11-15 12:48:32 -08:00
ptp.h net: dsa: mv88e6xxx: add PTP support for MV88E6250 family 2019-08-02 17:58:53 -07:00
serdes.c net: dsa: mv88e6xxx: centralize SERDES IRQ handling 2019-09-01 12:16:38 -07:00
serdes.h net: dsa: mv88e6xxx: centralize SERDES IRQ handling 2019-09-01 12:16:38 -07:00
smi.c net: dsa: mv88e6xxx: add delay in direct SMI wait 2019-08-11 21:27:15 -07:00
smi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00