From: Vladimir Oltean <olteanv@gmail.com>
To: Tobias Waldekranz <tobias@waldekranz.com>
Cc: davem@davemloft.net, kuba@kernel.org,
Marek Behun <kabel@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: Ensure STU support in VLAN MSTI callback
Date: Fri, 18 Mar 2022 22:41:10 +0200 [thread overview]
Message-ID: <20220318204110.6zmkoa56vxtmgswv@skbuf> (raw)
In-Reply-To: <20220318201321.4010543-3-tobias@waldekranz.com>
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@waldekranz.com>
> ---
Reviewed-by: Vladimir Oltean <olteanv@gmail.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
>
next prev parent reply other threads:[~2022-03-18 20:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 20:13 [PATCH net-next 0/2] net: dsa: mv88e6xxx: MST Fixes Tobias Waldekranz
2022-03-18 20:13 ` [PATCH net-next 1/2] net: dsa: mv88e6xxx: Require ops be implemented to claim STU support Tobias Waldekranz
2022-03-18 20:40 ` Vladimir Oltean
2022-03-18 21:23 ` Florian Fainelli
2022-03-19 19:00 ` Marek Behún
2022-03-18 20:13 ` [PATCH net-next 2/2] net: dsa: mv88e6xxx: Ensure STU support in VLAN MSTI callback Tobias Waldekranz
2022-03-18 20:41 ` Vladimir Oltean [this message]
2022-03-18 21:23 ` Florian Fainelli
2022-03-19 19:00 ` Marek Behún
2022-03-21 23:00 ` [PATCH net-next 0/2] net: dsa: mv88e6xxx: MST Fixes patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220318204110.6zmkoa56vxtmgswv@skbuf \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kabel@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tobias@waldekranz.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox