kernel: bump 5.10 to 5.10.145
[openwrt/staging/ansuel.git] / target / linux / generic / hack-5.10 / 711-net-dsa-mv88e6xxx-disable-ATU-violation.patch
1 From: DENG Qingfang <dqfext@gmail.com>
2 Subject: DSA: roaming fix for Marvell mv88e6xxx
3
4 Marvell mv88e6xxx switch series cannot perform MAC learning from
5 CPU-injected (FROM_CPU) DSA frames, which results in 2 issues.
6 - excessive flooding, due to the fact that DSA treats those addresses
7 as unknown
8 - the risk of stale routes, which can lead to temporary packet loss
9
10 Backport those patch series from netdev mailing list, which solve these
11 issues by adding and clearing static entries to the switch's FDB.
12
13 Add a hack patch to set default VID to 1 in port_fdb_{add,del}. Otherwise
14 the static entries will be added to the switch's private FDB if VLAN
15 filtering disabled, which will not work.
16
17 The switch may generate an "ATU violation" warning when a client moves
18 from the CPU port to a switch port because the static ATU entry added by
19 DSA core still points to the CPU port. DSA core will then clear the static
20 entry so it is not fatal. Disable the warning so it will not confuse users.
21
22 Link: https://lore.kernel.org/netdev/20210106095136.224739-1-olteanv@gmail.com/
23 Link: https://lore.kernel.org/netdev/20210116012515.3152-1-tobias@waldekranz.com/
24 Ref: https://gitlab.nic.cz/turris/turris-build/-/issues/165
25 Submitted-by: DENG Qingfang <dqfext@gmail.com>
26 ---
27 drivers/net/dsa/mv88e6xxx/chip.c | 3 +++
28 3 files changed, 3 insertions(+)
29
30 --- a/drivers/net/dsa/mv88e6xxx/chip.c
31 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
32 @@ -2709,6 +2709,9 @@ static int mv88e6xxx_setup_port(struct m
33 if (dsa_is_cpu_port(ds, port))
34 reg = 0;
35
36 + /* Disable ATU member violation interrupt */
37 + reg |= MV88E6XXX_PORT_ASSOC_VECTOR_IGNORE_WRONG;
38 +
39 err = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_ASSOC_VECTOR,
40 reg);
41 if (err)