Patch "net: dsa: microchip: fix initial port flush problem" 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: fix initial port flush problem

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-fix-initial-port-flush-problem.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 89af5b76e55d2ea52b3b505b3d4680d415a51943
Author: Tristram Ha <tristram.ha@xxxxxxxxxxxxx>
Date:   Tue Jun 18 17:16:42 2024 -0700

    net: dsa: microchip: fix initial port flush problem
    
    [ Upstream commit ad53f5f54f351e967128edbc431f0f26427172cf ]
    
    The very first flush in any port will flush all learned addresses in all
    ports.  This can be observed by unplugging the cable from one port while
    additional ports are connected and dumping the fdb entries.
    
    This problem is caused by the initially wrong value programmed to the
    REG_SW_LUE_CTRL_1 register.  Setting SW_FLUSH_STP_TABLE and
    SW_FLUSH_MSTP_TABLE bits does not have an immediate effect.  It is when
    ksz9477_flush_dyn_mac_table() is called then the SW_FLUSH_STP_TABLE bit
    takes effect and flushes all learned entries.  After that call both bits
    are reset and so the next port flush will not cause such problem again.
    
    Fixes: b987e98e50ab ("dsa: add DSA switch driver for Microchip KSZ9477")
    Signed-off-by: Tristram Ha <tristram.ha@xxxxxxxxxxxxx>
    Link: https://patch.msgid.link/1718756202-2731-1-git-send-email-Tristram.Ha@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 ba2dc01e0f6bf..5b398608f2975 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -206,10 +206,8 @@ static int ksz9477_reset_switch(struct ksz_device *dev)
 			   SPI_AUTO_EDGE_DETECTION, 0);
 
 	/* default configuration */
-	ksz_read8(dev, REG_SW_LUE_CTRL_1, &data8);
-	data8 = SW_AGING_ENABLE | SW_LINK_AUTO_AGING |
-	      SW_SRC_ADDR_FILTER | SW_FLUSH_STP_TABLE | SW_FLUSH_MSTP_TABLE;
-	ksz_write8(dev, REG_SW_LUE_CTRL_1, data8);
+	ksz_write8(dev, REG_SW_LUE_CTRL_1,
+		   SW_AGING_ENABLE | SW_LINK_AUTO_AGING | SW_SRC_ADDR_FILTER);
 
 	/* disable interrupts */
 	ksz_write32(dev, REG_SW_INT_MASK__4, SWITCH_INT_MASK);




[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