]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: dsa: rtl931x: Fix port L2 table flushing 20422/head
authorSven Eckelmann <se@simonwunderlich.de>
Thu, 16 Oct 2025 09:06:08 +0000 (11:06 +0200)
committerRobert Marko <robimarko@gmail.com>
Thu, 16 Oct 2025 14:35:20 +0000 (16:35 +0200)
commit84b7057fe3a83b32b69da4beb26d3f9d81a75213
tree2c79ab2ffe7f40d9f2bcd4fb977f60b4d9deebac
parent9b48cf6d94b121c7e7ef455757292f1ed5047d48
realtek: dsa: rtl931x: Fix port L2 table flushing

The DSA driver must flush the HW FDB when a port changes from
learning/forwarding to disabled/blocking/listening.

But the implementation for RTL931x was writing the port information
starting at bit 11 (bit 11 of the second 32-bit L2_TBL_FLUSH_CTRL
register). But this offset is the AGG_VID and not the port. The actual
position is 43 (bit 11 of the first register).

As result, the FDB was always only flushed for the port 0 and not for the
selected port.

Fixes: 9ed609705481 ("realtek: Add HW support for RTL931X for PIE, L2 and STP aging")
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20422
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c