[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240405143240.rwm5klyy7nm7lvdm@skbuf>
Date: Fri, 5 Apr 2024 17:32:40 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Pawel Dembicki <paweldembicki@...il.com>
Cc: netdev@...r.kernel.org, Linus Walleij <linus.walleij@...aro.org>,
Simon Horman <horms@...nel.org>,
Russell King <linux@...linux.org.uk>, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
UNGLinuxDriver@...rochip.com, linux-kernel@...r.kernel.org
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@...linux.org.uk>
> Reviewed-by: Andrew Lunn <andrew@...n.ch>
> Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
> Reviewed-by: Florian Fainelli <florian.fainelli@...adcom.com>
> Signed-off-by: Pawel Dembicki <paweldembicki@...il.com>
> ---
Reviewed-by: Vladimir Oltean <olteanv@...il.com>
Powered by blists - more mailing lists