]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: dsa: microchip: Fix reserved multicast address table programming
authorTristram Ha <tristram.ha@microchip.com>
Wed, 5 Nov 2025 03:37:41 +0000 (19:37 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 6 Nov 2025 15:11:36 +0000 (07:11 -0800)
commit96baf482ca1f69f0da9d10a5bd8422c87ea9039e
tree797b850ab2fac44807f331403399c3a31375ff86
parent7d1988a943850c584e8e2e4bcc7a3b5275024072
net: dsa: microchip: Fix reserved multicast address table programming

KSZ9477/KSZ9897 and LAN937X families of switches use a reserved multicast
address table for some specific forwarding with some multicast addresses,
like the one used in STP.  The hardware assumes the host port is the last
port in KSZ9897 family and port 5 in LAN937X family.  Most of the time
this assumption is correct but not in other cases like KSZ9477.
Originally the function just setups the first entry, but the others still
need update, especially for one common multicast address that is used by
PTP operation.

LAN937x also uses different register bits when accessing the reserved
table.

Fixes: 457c182af597 ("net: dsa: microchip: generic access to ksz9477 static and reserved table")
Signed-off-by: Tristram Ha <tristram.ha@microchip.com>
Tested-by: Ɓukasz Majewski <lukma@nabladev.com>
Link: https://patch.msgid.link/20251105033741.6455-1-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
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_common.h