Skip to content

Commit 5a59a58

Browse files
ccpalexkuba-moo
authored andcommitted
net: dsa: lan9303: allow vid != 0 in port_fdb_{add|del} methods
LAN9303 doesn't associate FDB (ALR) entries with VLANs, it has just one global Address Logic Resolution table [1]. Ignore VID in port_fdb_{add|del} methods, go on with the global table. This is the same semantics as hellcreek or RZ/N1 implement. Visible symptoms: LAN9303_MDIO 5b050000.ethernet-1:00: port 2 failed to delete 00:xx:xx:xx:xx:cf vid 1 from fdb: -2 LAN9303_MDIO 5b050000.ethernet-1:00: port 2 failed to add 00:xx:xx:xx:xx:cf vid 1 to fdb: -95 [1] https://ww1.microchip.com/downloads/en/DeviceDoc/00002308A.pdf Fixes: 0620427 ("net: dsa: lan9303: Add fdb/mdb manipulation") Signed-off-by: Alexander Sverdlin <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ed779fe commit 5a59a58

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/net/dsa/lan9303-core.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,8 +1188,6 @@ static int lan9303_port_fdb_add(struct dsa_switch *ds, int port,
11881188
struct lan9303 *chip = ds->priv;
11891189

11901190
dev_dbg(chip->dev, "%s(%d, %pM, %d)\n", __func__, port, addr, vid);
1191-
if (vid)
1192-
return -EOPNOTSUPP;
11931191

11941192
return lan9303_alr_add_port(chip, addr, port, false);
11951193
}
@@ -1201,8 +1199,6 @@ static int lan9303_port_fdb_del(struct dsa_switch *ds, int port,
12011199
struct lan9303 *chip = ds->priv;
12021200

12031201
dev_dbg(chip->dev, "%s(%d, %pM, %d)\n", __func__, port, addr, vid);
1204-
if (vid)
1205-
return -EOPNOTSUPP;
12061202
lan9303_alr_del_port(chip, addr, port);
12071203

12081204
return 0;

0 commit comments

Comments
 (0)