Skip to content

Commit 6c977c5

Browse files
Rakesh Sankaranarayanankuba-moo
authored andcommitted
net: dsa: microchip: ksz9477: port map correction in ALU table entry register
ALU table entry 2 register in KSZ9477 have bit positions reserved for forwarding port map. This field is referred in ksz9477_fdb_del() for clearing forward port map and alu table. But current fdb_del refer ALU table entry 3 register for accessing forward port map. Update ksz9477_fdb_del() to get forward port map from correct alu table entry register. With this bug, issue can be observed while deleting static MAC entries. Delete any specific MAC entry using "bridge fdb del" command. This should clear all the specified MAC entries. But it is observed that entries with self static alone are retained. Tested on LAN9370 EVB since ksz9477_fdb_del() is used common across LAN937x and KSZ series. Fixes: b987e98 ("dsa: add DSA switch driver for Microchip KSZ9477") Signed-off-by: Rakesh Sankaranarayanan <[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 9038482 commit 6c977c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/dsa/microchip/ksz9477.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,10 @@ int ksz9477_fdb_del(struct ksz_device *dev, int port,
540540
ksz_read32(dev, REG_SW_ALU_VAL_D, &alu_table[3]);
541541

542542
/* clear forwarding port */
543-
alu_table[2] &= ~BIT(port);
543+
alu_table[1] &= ~BIT(port);
544544

545545
/* if there is no port to forward, clear table */
546-
if ((alu_table[2] & ALU_V_PORT_MAP) == 0) {
546+
if ((alu_table[1] & ALU_V_PORT_MAP) == 0) {
547547
alu_table[0] = 0;
548548
alu_table[1] = 0;
549549
alu_table[2] = 0;

0 commit comments

Comments
 (0)