]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dsa: b53: fix BCM5325/65 ARL entry multicast port masks
authorJonas Gorski <jonas.gorski@gmail.com>
Fri, 28 Nov 2025 08:06:23 +0000 (09:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:30 +0000 (14:03 +0100)
commit0d0116335eba7f83fd756d2e301fbc0f64152961
tree5db7adedbcb0b2b527688460f5251abec2547af4
parent8e881dfd5255f7a435e3c31c6123fed35154451a
net: dsa: b53: fix BCM5325/65 ARL entry multicast port masks

[ Upstream commit 3b08863469aa6028ac7c3120966f4e2f6051cf6b ]

We currently use the mask 0xf for writing and reading b53_entry::port,
but this is only correct for unicast ARL entries. Multicast ARL entries
use a bitmask, and 0xf is not enough space for ports > 3, which includes
the CPU port.

So extend the mask accordingly to also fit port 4 (bit 4) and MII (bit
5). According to the datasheet the multicast port mask is [60:48],
making it 12 bit wide, but bits 60-55 are reserved anyway, and collide
with the priority field at [60:59], so I am not sure if this is valid.
Therefore leave it at the actual used range, [53:48].

The ARL search result register differs a bit, and there the mask is only
[52:48], so only spanning the user ports. The MII port bit is
contained in the Search Result Extension register. So create a separate
search result parse function that properly handles this.

Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Link: https://patch.msgid.link/20251128080625.27181-6-jonas.gorski@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/b53/b53_common.c
drivers/net/dsa/b53/b53_priv.h
drivers/net/dsa/b53/b53_regs.h