]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.4/net-dsa-lan9303-allow-vid-0-in-port_fdb_-add-del-met.patch
Linux 4.19.286
[thirdparty/kernel/stable-queue.git] / queue-5.4 / net-dsa-lan9303-allow-vid-0-in-port_fdb_-add-del-met.patch
1 From 20775ba91a3b6e12fb20ea6f84b37432e32d090e Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Wed, 31 May 2023 16:38:26 +0200
4 Subject: net: dsa: lan9303: allow vid != 0 in port_fdb_{add|del} methods
5
6 From: Alexander Sverdlin <alexander.sverdlin@siemens.com>
7
8 [ Upstream commit 5a59a58ec25d44f853c26bdbfda47d73b3067435 ]
9
10 LAN9303 doesn't associate FDB (ALR) entries with VLANs, it has just one
11 global Address Logic Resolution table [1].
12
13 Ignore VID in port_fdb_{add|del} methods, go on with the global table. This
14 is the same semantics as hellcreek or RZ/N1 implement.
15
16 Visible symptoms:
17 LAN9303_MDIO 5b050000.ethernet-1:00: port 2 failed to delete 00:xx:xx:xx:xx:cf vid 1 from fdb: -2
18 LAN9303_MDIO 5b050000.ethernet-1:00: port 2 failed to add 00:xx:xx:xx:xx:cf vid 1 to fdb: -95
19
20 [1] https://ww1.microchip.com/downloads/en/DeviceDoc/00002308A.pdf
21
22 Fixes: 0620427ea0d6 ("net: dsa: lan9303: Add fdb/mdb manipulation")
23 Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
24 Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
25 Link: https://lore.kernel.org/r/20230531143826.477267-1-alexander.sverdlin@siemens.com
26 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
27 Signed-off-by: Sasha Levin <sashal@kernel.org>
28 ---
29 drivers/net/dsa/lan9303-core.c | 4 ----
30 1 file changed, 4 deletions(-)
31
32 diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
33 index 625db92792dab..67f8faa22783e 100644
34 --- a/drivers/net/dsa/lan9303-core.c
35 +++ b/drivers/net/dsa/lan9303-core.c
36 @@ -1187,8 +1187,6 @@ static int lan9303_port_fdb_add(struct dsa_switch *ds, int port,
37 struct lan9303 *chip = ds->priv;
38
39 dev_dbg(chip->dev, "%s(%d, %pM, %d)\n", __func__, port, addr, vid);
40 - if (vid)
41 - return -EOPNOTSUPP;
42
43 return lan9303_alr_add_port(chip, addr, port, false);
44 }
45 @@ -1200,8 +1198,6 @@ static int lan9303_port_fdb_del(struct dsa_switch *ds, int port,
46 struct lan9303 *chip = ds->priv;
47
48 dev_dbg(chip->dev, "%s(%d, %pM, %d)\n", __func__, port, addr, vid);
49 - if (vid)
50 - return -EOPNOTSUPP;
51 lan9303_alr_del_port(chip, addr, port);
52
53 return 0;
54 --
55 2.39.2
56