mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
net: dsa: b53: fix VLAN_ID_IDX write size for BCM5325/65
Since BCM5325 and BCM5365 only support up to 256 VLANs, the VLAN_ID_IDX
register is only 8 bit wide, not 16 bit, so use an appropriate accessor.
Fixes: c45655386e ("net: dsa: b53: add support for FDB operations on 5325/5365")
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Link: https://patch.msgid.link/20251128080625.27181-2-jonas.gorski@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
4e3583cb61
commit
6f268e275c
|
|
@ -1966,8 +1966,12 @@ static int b53_arl_op(struct b53_device *dev, int op, int port,
|
|||
|
||||
/* Perform a read for the given MAC and VID */
|
||||
b53_write48(dev, B53_ARLIO_PAGE, B53_MAC_ADDR_IDX, mac);
|
||||
if (!is5325m(dev))
|
||||
b53_write16(dev, B53_ARLIO_PAGE, B53_VLAN_ID_IDX, vid);
|
||||
if (!is5325m(dev)) {
|
||||
if (is5325(dev) || is5365(dev))
|
||||
b53_write8(dev, B53_ARLIO_PAGE, B53_VLAN_ID_IDX, vid);
|
||||
else
|
||||
b53_write16(dev, B53_ARLIO_PAGE, B53_VLAN_ID_IDX, vid);
|
||||
}
|
||||
|
||||
/* Issue a read operation for this MAC */
|
||||
ret = b53_arl_rw_op(dev, 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user