lkml.org 
[lkml]   [2024]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v8 01/16] net: dsa: vsc73xx: use read_poll_timeout instead delay loop
On Wed, Apr 03, 2024 at 12:37:17PM +0200, Pawel Dembicki wrote:
> Switch the delay loop during the Arbiter empty check from
> vsc73xx_adjust_link() to use read_poll_timeout(). Functionally,
> one msleep() call is eliminated at the end of the loop in the timeout
> case.
>
> As Russell King suggested:
>
> "This [change] avoids the issue that on the last iteration, the code reads
> the register, tests it, finds the condition that's being waiting for is
> false, _then_ waits and end up printing the error message - that last
> wait is rather useless, and as the arbiter state isn't checked after
> waiting, it could be that we had success during the last wait."
>
> Suggested-by: Russell King <linux@armlinux.org.uk>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
> ---

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>

\
 
 \ /
  Last update: 2024-05-27 16:26    [W:0.177 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site