From: Andrew Lunn <andrew@lunn.ch>
To: Luke Howard <lukeh@padl.com>
Cc: Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vivien Didelot <vivien.didelot@gmail.com>,
Gregory CLEMENT <gregory.clement@bootlin.com>,
Cedric Jehasse <cedric.jehasse@gmail.com>,
Kieran Tyrrell <kieran@sienda.com>,
Max Holtmann <mh@rme-audio.de>, Max Hunter <max@huntershome.org>,
Christoph Mellauner <christoph.mellauner@joyned.at>,
Simon Gapp <simon.gapp@gapp-audio.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] net: dsa: mv88e6xxx: write the ATU FID register on 88E6141/88E6341
Date: Fri, 3 Jul 2026 17:31:24 +0200 [thread overview]
Message-ID: <eadfade3-c46d-42fd-8301-3b2acebd7bcb@lunn.ch> (raw)
In-Reply-To: <20260703-mv88e6x41-fixes-v1-1-fbd3a1bf8965@padl.com>
On Fri, Jul 03, 2026 at 04:42:55PM +1000, Luke Howard wrote:
> The existing code assumed the 88E6141/88E6341 did not have a dedicated
> ATU FID register because of its database count (256), instead taking
> the legacy path which resulted in the FID register never being set.
>
> This resulted in every FDB entry being loaded into FID 0, breaking
> VLAN aware bridging.
>
> Fixes: a75961d0ebfd ("net: dsa: mv88e6xxx: Add support for ethernet switch 88E6341")
Please submit fixes to the net tree.
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
> @@ -131,6 +131,7 @@ struct mv88e6xxx_info {
> u16 prod_num;
> const char *name;
> unsigned int num_databases;
> + bool atu_fid_reg;
> unsigned int num_macs;
> unsigned int num_ports;
> unsigned int num_internal_phys;
Please think about padding. The current structure layout is not great,
invalid_port_mask should be somewhere else, but please don't make it
worse. Also, this structure has some reasonable comments. You have the
chance to comment that the number of FIBs does not imply if there is a
dedicated register, there are examples with 255 and a dedicated
register.
> diff --git a/drivers/net/dsa/mv88e6xxx/global1_atu.c b/drivers/net/dsa/mv88e6xxx/global1_atu.c
> index c47f068f56b32..aa5adc78607ca 100644
> --- a/drivers/net/dsa/mv88e6xxx/global1_atu.c
> +++ b/drivers/net/dsa/mv88e6xxx/global1_atu.c
> @@ -135,7 +135,7 @@ static int mv88e6xxx_g1_atu_op(struct mv88e6xxx_chip *chip, u16 fid, u16 op)
> int err;
>
> /* FID bits are dispatched all around gradually as more are supported */
> - if (mv88e6xxx_num_databases(chip) > 256) {
> + if (mv88e6xxx_num_databases(chip) > 256 || chip->info->atu_fid_reg) {
So currently, > 256 implies a dedicated register. But do we need both
> 255 and chip->info->atu_fid_reg? I would probably set atu_fid_reg
true for all devices which have a dedicated register.
Andrew
---
pw-bot: cr
next prev parent reply other threads:[~2026-07-03 15:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 6:42 [PATCH net-next 0/2] net: dsa: mv88e6xxx: 6141/6341 workarounds Luke Howard
2026-07-03 6:42 ` [PATCH net-next 1/2] net: dsa: mv88e6xxx: write the ATU FID register on 88E6141/88E6341 Luke Howard
2026-07-03 15:31 ` Andrew Lunn [this message]
2026-07-03 21:28 ` Luke Howard
2026-07-03 6:42 ` [PATCH net-next 2/2] net: dsa: mv88e6xxx: use direct ATU hash on 88E6141/6341 Luke Howard
2026-07-03 15:40 ` Andrew Lunn
2026-07-03 21:28 ` Luke Howard
2026-07-03 21:43 ` Andrew Lunn
2026-07-03 21:55 ` Luke Howard
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=eadfade3-c46d-42fd-8301-3b2acebd7bcb@lunn.ch \
--to=andrew@lunn.ch \
--cc=cedric.jehasse@gmail.com \
--cc=christoph.mellauner@joyned.at \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregory.clement@bootlin.com \
--cc=kieran@sienda.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukeh@padl.com \
--cc=max@huntershome.org \
--cc=mh@rme-audio.de \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=simon.gapp@gapp-audio.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