Re: [PATCH net] net: dsa: b53: be VLAN unaware when not filtering

From: Vladimir Oltean

Date: Thu Aug 06 2026 - 06:27:53 EST


On Wed, Aug 05, 2026 at 09:44:51AM +0200, Jonas Gorski wrote:
> While SVL is active, any ARL add/remove operations ignore the VID
> field/register and force it to 0, making existing static ARL entries
> with VID != 0 inaccessible, and any (static) ARL entries added will
> have their VID set to 0, regardless what the software entry said.

Is this a hardware limitation, or is it because global state
(dev->vlan_enabled) blinds b53_arl_rw_op()'s attempts to look at FDB
entries of the other type?

static int b53_arl_rw_op(struct b53_device *dev, unsigned int op)
{
u8 reg;

if (op > ARLTBL_RW)
return -EINVAL;

b53_read8(dev, B53_ARLIO_PAGE, B53_ARLTBL_RW_CTRL, &reg);
reg |= ARLTBL_START_DONE;
if (op)
reg |= ARLTBL_RW;
else
reg &= ~ARLTBL_RW;
if (dev->vlan_enabled)
reg &= ~ARLTBL_IVL_SVL_SELECT;
else
reg |= ARLTBL_IVL_SVL_SELECT;
b53_write8(dev, B53_ARLIO_PAGE, B53_ARLTBL_RW_CTRL, reg);

return b53_arl_op_wait(dev);
}