Patch "net: dsa: microchip: ksz8: fix ksz8_fdb_dump()" has been added to the 6.1-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: ksz8: fix ksz8_fdb_dump()

to the 6.1-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-ksz8-fix-ksz8_fdb_dump.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 448da3f486b30b6c8c9bacc048a169b32bfc9dd1
Author: Oleksij Rempel <linux@xxxxxxxxxxxxxxxx>
Date:   Fri Mar 24 09:06:03 2023 +0100

    net: dsa: microchip: ksz8: fix ksz8_fdb_dump()
    
    [ Upstream commit 88e943e83827a349f70c3464b3eba7260be7461d ]
    
    Before this patch, the ksz8_fdb_dump() function had several issues, such
    as uninitialized variables and incorrect usage of source port as a bit
    mask. These problems caused inaccurate reporting of vid information and
    port assignment in the bridge fdb.
    
    Fixes: e587be759e6e ("net: dsa: microchip: update fdb add/del/dump in ksz_common")
    Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
    Acked-by: Arun Ramadoss <arun.ramadoss@xxxxxxxxxxxxx>
    Reviewed-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
index bd3b133e7085b..22250ae222b5b 100644
--- a/drivers/net/dsa/microchip/ksz8795.c
+++ b/drivers/net/dsa/microchip/ksz8795.c
@@ -907,15 +907,14 @@ int ksz8_fdb_dump(struct ksz_device *dev, int port,
 	u16 entries = 0;
 	u8 timestamp = 0;
 	u8 fid;
-	u8 member;
-	struct alu_struct alu;
+	u8 src_port;
+	u8 mac[ETH_ALEN];
 
 	do {
-		alu.is_static = false;
-		ret = ksz8_r_dyn_mac_table(dev, i, alu.mac, &fid, &member,
+		ret = ksz8_r_dyn_mac_table(dev, i, mac, &fid, &src_port,
 					   &timestamp, &entries);
-		if (!ret && (member & BIT(port))) {
-			ret = cb(alu.mac, alu.fid, alu.is_static, data);
+		if (!ret && port == src_port) {
+			ret = cb(mac, fid, false, data);
 			if (ret)
 				break;
 		}



[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