]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: dsa: microchip: Fix KSZ9477 set_ageing_time function
authorTristram Ha <tristram.ha@microchip.com>
Wed, 18 Dec 2024 02:02:23 +0000 (18:02 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 20 Dec 2024 02:04:04 +0000 (18:04 -0800)
commit262bfba8ab820641c8cfbbf03b86d6c00242c078
tree81dd32e074272a9880755d01ff370e8c420f1d53
parent25c6a5ab151fb9c886552bf5aa7cbf2a5c6e96af
net: dsa: microchip: Fix KSZ9477 set_ageing_time function

The aging count is not a simple 11-bit value but comprises a 3-bit
multiplier and an 8-bit second count.  The code tries to use the
original multiplier which is 4 as the second count is still 300 seconds
by default.

Fixes: 2c119d9982b1 ("net: dsa: microchip: add the support for set_ageing_time")
Signed-off-by: Tristram Ha <tristram.ha@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241218020224.70590-2-Tristram.Ha@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz9477.c
drivers/net/dsa/microchip/ksz9477_reg.h