Messages in this thread | | | Date | Fri, 5 Apr 2024 17:32:40 +0300 | From | Vladimir Oltean <> | Subject | Re: [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>
| |