[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220318204110.6zmkoa56vxtmgswv@skbuf>
Date: Fri, 18 Mar 2022 22:41:10 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Tobias Waldekranz <tobias@...dekranz.com>
Cc: davem@...emloft.net, kuba@...nel.org,
Marek Behun <kabel@...nel.org>, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: Ensure STU support in
VLAN MSTI callback
On Fri, Mar 18, 2022 at 09:13:21PM +0100, Tobias Waldekranz wrote:
> In the same way that we check for STU support in the MST state
> callback, we should also verify it before trying to change a VLANs
> MSTI membership.
>
> Fixes: acaf4d2e36b3 ("net: dsa: mv88e6xxx: MST Offloading")
> Signed-off-by: Tobias Waldekranz <tobias@...dekranz.com>
> ---
Reviewed-by: Vladimir Oltean <olteanv@...il.com>
> drivers/net/dsa/mv88e6xxx/chip.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index b36393ba6d49..afb9417ffca0 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -2678,6 +2678,9 @@ static int mv88e6xxx_vlan_msti_set(struct dsa_switch *ds,
> u8 old_sid, new_sid;
> int err;
>
> + if (!mv88e6xxx_has_stu(chip))
> + return -EOPNOTSUPP;
> +
> mv88e6xxx_reg_lock(chip);
>
> err = mv88e6xxx_vtu_get(chip, msti->vid, &vlan);
> --
> 2.25.1
>
Powered by blists - more mailing lists