From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Daniel Machon <daniel.machon@microchip.com>
Cc: netdev@vger.kernel.org, Jonas Gorski <jonas.gorski@gmail.com>,
Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net v2 2/5] net: dsa: b53: fix the SRAB grant timeout check
Date: Fri, 30 Oct 2026 11:38:31 -0700 [thread overview]
Message-ID: <23f8cad1-d1a6-477f-bb3b-f3471ec50d21@broadcom.com> (raw)
In-Reply-To: <20261030113422.xg2sinp5hdiyfh4p@DEN-DL-M70577>
On 10/30/26 04:34, Daniel Machon wrote:
>> b53_srab_request_grant() polls for a grant up to 20 times, but checks for
>> an iteration count of five to detect a timeout. This rejects a grant
>> received on the sixth poll and reports success when all 20 polls finish
>> without a grant. The latter allows a register access to proceed without
>> ownership of the switch resources.
>>
>> Check for exhaustion of all 20 iterations instead.
>>
>> Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
>> Reviewed-by: Jonas Gorski <jonas.gorski@gmail.com>
>> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
>> ---
>> drivers/net/dsa/b53/b53_srab.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/dsa/b53/b53_srab.c b/drivers/net/dsa/b53/b53_srab.c
>> index 83a03fca142a..f4689078ccd5 100644
>> --- a/drivers/net/dsa/b53/b53_srab.c
>> +++ b/drivers/net/dsa/b53/b53_srab.c
>> @@ -105,7 +105,7 @@ static int b53_srab_request_grant(struct b53_device *dev)
>> break;
>> usleep_range(10, 100);
>> }
>> - if (WARN_ON(i == 5))
>> + if (WARN_ON(i == 20))
>
> I wondered why the initial check was i == 5. Seems like b53_srab_op(), just
> below this one, has more or less the same loop, but with 5 iterations. Probably a
> copy paste error.
Yes, that seems like it. I will be addressing the late Sashiko feedback
received on v1 / patch #4 and re-submit a v3.
pw-bot: cr
--
Florian
next prev parent reply other threads:[~2026-10-30 18:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 21:23 [PATCH net v2 0/5] net: dsa: b53: Preliminary fixes Florian Fainelli
2026-10-28 21:23 ` [PATCH net v2 1/5] net: dsa: b53: initialize the jumbo frame size register offset Florian Fainelli
2026-10-28 21:23 ` [PATCH net v2 2/5] net: dsa: b53: fix the SRAB grant timeout check Florian Fainelli
2026-10-30 11:34 ` Daniel Machon
2026-10-30 18:38 ` Florian Fainelli [this message]
2026-11-01 21:46 ` netdev-bot+sashiko
2026-10-28 21:23 ` [PATCH net v2 3/5] net: dsa: b53: clear stale state when creating an ARL entry Florian Fainelli
2026-11-01 21:46 ` netdev-bot+sashiko
2026-10-28 21:23 ` [PATCH net v2 4/5] net: dsa: b53: reject conflicting mirror destinations Florian Fainelli
2026-11-01 21:46 ` netdev-bot+sashiko
2026-10-28 21:23 ` [PATCH net v2 5/5] net: dsa: b53: use the correct override register 2 Gbps bit 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=23f8cad1-d1a6-477f-bb3b-f3471ec50d21@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=andrew@lunn.ch \
--cc=daniel.machon@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=jonas.gorski@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
/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
all inboxes | Powered by JetHome®