Patch "net: dsa: microchip: ksz9477: port map correction in ALU table entry register" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: dsa: microchip: ksz9477: port map correction in ALU table entry register

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-dsa-microchip-ksz9477-port-map-correction-in-alu.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9cb141507f952e356819cc950c82d79424c84222
Author: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@xxxxxxxxxxxxx>
Date:   Wed Jan 18 23:17:35 2023 +0530

    net: dsa: microchip: ksz9477: port map correction in ALU table entry register
    
    [ Upstream commit 6c977c5c2e4c5d8ad1b604724cc344e38f96fe9b ]
    
    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: b987e98e50ab ("dsa: add DSA switch driver for Microchip KSZ9477")
    Signed-off-by: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@xxxxxxxxxxxxx>
    Reviewed-by: Vladimir Oltean <olteanv@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20230118174735.702377-1-rakesh.sankaranarayanan@xxxxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
index c66e78b2870d..ba2dc01e0f6b 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -682,10 +682,10 @@ static int ksz9477_port_fdb_del(struct dsa_switch *ds, int port,
 		ksz_read32(dev, REG_SW_ALU_VAL_D, &alu_table[3]);
 
 		/* clear forwarding port */
-		alu_table[2] &= ~BIT(port);
+		alu_table[1] &= ~BIT(port);
 
 		/* if there is no port to forward, clear table */
-		if ((alu_table[2] & ALU_V_PORT_MAP) == 0) {
+		if ((alu_table[1] & ALU_V_PORT_MAP) == 0) {
 			alu_table[0] = 0;
 			alu_table[1] = 0;
 			alu_table[2] = 0;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux