From: netdev-bot+sashiko@kernel.org
To: florian.fainelli@broadcom.com
Cc: netdev@vger.kernel.org, jonas.gorski@gmail.com, andrew@lunn.ch,
olteanv@gmail.com, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, vivien.didelot@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v5 5/8] net: dsa: b53: use the correct override register 2 Gbps bit
Date: Mon, 16 Nov 2026 19:02:20 +0000 [thread overview]
Message-ID: <179485574004.3136.10514561050304983493@kernel.org> (raw)
In-Reply-To: <20261112180202.324504-6-florian.fainelli@broadcom.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The Fixes: tag covers only one of the two bugs this patch fixes.
--
net: dsa: b53: use the correct override register 2 Gbps bit
This patch picks the 2 Gbps speed bit per register in
b53_force_port_config(). The IMP override register uses
PORT_OVERRIDE_SPEED_2000M and the per-port GMII override registers use
GMII_PO_SPEED_2000M. As a result, lower speeds clear the correct bit and
2 Gbps sets the correct bit on GMII ports.
> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> index 64e04c5731a69..d8dafa9e0c44d 100644
> --- a/drivers/net/dsa/b53/b53_common.c
> +++ b/drivers/net/dsa/b53/b53_common.c
[ ... ]
> @@ -1449,11 +1451,12 @@ static void b53_force_port_config(struct b53_device *dev, int port,
>
> reg &= ~(0x3 << GMII_PO_SPEED_S);
> if (is5301x(dev) || is58xx(dev))
> - reg &= ~PORT_OVERRIDE_SPEED_2000M;
> + reg &= ~speed2000;
>
> switch (speed) {
> case 2000:
> - reg |= PORT_OVERRIDE_SPEED_2000M;
> + if (is5301x(dev) || is58xx(dev))
> + reg |= speed2000;
> fallthrough;
[Severity: Low]
This isn't a bug, but should the Fixes: tag also cover the 2 Gbps set
path? The commit message has:
Fixes: b6a8a5477fe9 ("net: dsa: b53: fix resetting speed and pause on forced link")
b6a8a5477fe9 added the clear of PORT_OVERRIDE_SPEED_2000M at lower speeds.
On the GMII register that clear removes GMII_PO_EN (BIT(6)) and leaves a
stale GMII_PO_SPEED_2000M behind. That part of the patch matches the tag.
The change in case 2000 fixes an older problem. On a GMII port, ORing in
PORT_OVERRIDE_SPEED_2000M has always set GMII_PO_EN and never
GMII_PO_SPEED_2000M (BIT(7)), so 2 Gbps was never selected on that
register.
The case 2000 line goes back to 967dd82ffc52. Later, 63f8428b4077 switched
the code from cpu_port to imp_port, which moved BCM5301x CPU port 5 back
onto the GMII register path, and that path still set BIT(6).
In the current tree, the only caller that passes speed = 2000 is
b53_phylink_mac_link_up():
if ((is5301x(dev) || dev->chip_id == BCM58XX_DEVICE_ID) &&
dsa_is_cpu_port(ds, port)) {
tx_pause = true;
rx_pause = true;
speed = 2000;
}
That code came from 41af38324341 ("net: dsa: b53: restore the NSP IMP port
2 Gbps mode"). It also covers BCM5301x CPU ports 5 and 7, which go through
B53_GMII_PORT_OVERRIDE_CTRL(port).
The commit message says the patch makes it so "2 Gbps sets it". Would an
extra Fixes: tag for 41af38324341 describe what the patch fixes more
accurately?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112180202.324504-1-florian.fainelli%40broadcom.com
next prev parent reply other threads:[~2026-11-16 19:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 18:01 [PATCH net v5 0/8] net: dsa: b53: Preliminary fixes Florian Fainelli
2026-11-12 18:01 ` [PATCH net v5 1/8] net: dsa: b53: initialize the jumbo frame size register offset Florian Fainelli
2026-11-12 18:01 ` [PATCH net v5 2/8] net: dsa: b53: fix the SRAB grant timeout check Florian Fainelli
2026-11-12 18:01 ` [PATCH net v5 3/8] net: dsa: b53: clear stale state when creating an ARL entry Florian Fainelli
2026-11-16 19:02 ` netdev-bot+sashiko
2026-11-12 18:01 ` [PATCH net v5 4/8] net: dsa: b53: reject conflicting mirror destinations Florian Fainelli
2026-11-16 19:02 ` netdev-bot+sashiko
2026-11-12 18:01 ` [PATCH net v5 5/8] net: dsa: b53: use the correct override register 2 Gbps bit Florian Fainelli
2026-11-16 19:02 ` netdev-bot+sashiko [this message]
2026-11-12 18:02 ` [PATCH net v5 6/8] net: dsa: b53: reference count shared mirror source bits Florian Fainelli
2026-11-16 19:02 ` netdev-bot+sashiko
2026-11-12 18:02 ` [PATCH net v5 7/8] net: dsa: b53: harden mirror register programming Florian Fainelli
2026-11-16 19:02 ` netdev-bot+sashiko
2026-11-12 18:02 ` [PATCH net v5 8/8] net: dsa: b53: fix mirror port encoding on BCM5325 and BCM5365 Florian Fainelli
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=179485574004.3136.10514561050304983493@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=jonas.gorski@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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