All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH] net: phy: Fix overlong PHY timeout
Date: Sat, 4 Jan 2020 07:30:17 +0100	[thread overview]
Message-ID: <52aba91d-20ca-30b6-efbc-f7fcbe4b54df@denx.de> (raw)
In-Reply-To: <20200103220847.17415-1-andre.przywara@arm.com>

On 03.01.20 23:08, Andre Przywara wrote:
> Commit 27c3f70f3b50 ("net: phy: Increase link up delay in
> genphy_update_link()") increased the per-iteration waiting time from
> 1ms to 50ms, without adjusting the timeout counter. This lead to the
> timeout increasing from the typical 4 seconds to over three minutes.
> 
> Adjust the timeout counter evaluation by that factor of 50 to bring the
> timeout back to the intended value.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>   drivers/net/phy/phy.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index 80a7664e49..5cf9c165b6 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -244,7 +244,7 @@ int genphy_update_link(struct phy_device *phydev)
>   			/*
>   			 * Timeout reached ?
>   			 */
> -			if (i > PHY_ANEG_TIMEOUT) {
> +			if (i > (PHY_ANEG_TIMEOUT / 50)) {
>   				printf(" TIMEOUT !\n");
>   				phydev->link = 0;
>   				return -ETIMEDOUT;
> 

Andre, thanks for taking care of this.

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

  reply	other threads:[~2020-01-04  6:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-03 22:08 [PATCH] net: phy: Fix overlong PHY timeout Andre Przywara
2020-01-04  6:30 ` Stefan Roese [this message]
2020-01-30 11:00 ` Matthias Brugger
2020-02-21 16:33   ` Matthias Brugger
2020-03-05  7:25     ` Simon Goldschmidt
2020-03-05 23:20 ` Joe Hershberger

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=52aba91d-20ca-30b6-efbc-f7fcbe4b54df@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.