RE: [PATCH net-next v2 4/5] net: stmmac: Add write_hw parameter to VLAN filter operations
From: Ovidiu Panait
Date: Mon Mar 02 2026 - 17:55:51 EST
Hi Jakub,
>
>> On Wed, 25 Feb 2026 14:24:13 +0000 Ovidiu Panait wrote:
> > Add a write_hw parameter to the VLAN add/delete HW filter functions and
> > to stmmac_vlan_update(). This flag controls whether the actual hardware
> > register accesses are performed. When set to false, only the software
> > state is updated.
> >
> > The next commit will use this to defer hardware writes when the
> > interface is down.
>
> I wonder if instead of passing attributes like this around the driver
> shouldn't simply maintain a flag (or have other way to test) whether
> the clock to block X is currently enabled? It feels more like a global
> state / property than trickiness directly related to VLAN config.
>
I'll drop the write_hw logic and instead just check netif_running()
directly, to avoid passing attributes around.
In this case, the PHY RX clock needs to be on for the VLAN accesses to
succeed. When stmmac supports VLAN, the PHY RX clock is always kept on
via phylink when the interface is up, so I think there is no need for a
new flag, just checking if the interface is up should be enough.
> Also any strong reason to post this for net-next? We take fixes via
> the net tree, so when you repost please use "PATCH net". And an
> appropriate Fixes tag on the last patch would be great to have
> (presumably just ed64639bc1e0 again?)
Will do.
Thanks,
Ovidiu
> --
> pw-bot: cr