public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux•org.uk>
To: Asmaa Mnebhi <asmaa@nvidia•com>
Cc: davem@davemloft•net, netdev@vger•kernel.org, davthompson@nvidia•com
Subject: Re: [PATCH v1 1/1] net: phy: micrel: Add workaround for incomplete autonegotiation
Date: Tue, 2 Jan 2024 18:45:17 +0000	[thread overview]
Message-ID: <ZZRZvRKz6X61eUaH@shell.armlinux.org.uk> (raw)
In-Reply-To: <20231226141903.12040-1-asmaa@nvidia.com>

On Tue, Dec 26, 2023 at 09:19:03AM -0500, Asmaa Mnebhi wrote:
> +	/* KSZ9031's autonegotiation takes normally 4-5 seconds to complete.
> +	 * Occasionally it fails to complete autonegotiation. The workaround is
> +	 * to restart it.
> +	 */
> +        if (phydev->autoneg == AUTONEG_ENABLE) {
> +		while (timeout) {
> +			if (phy_aneg_done(phydev))
> +				break;
> +			mdelay(1000);
> +			timeout--;
> +		};

Extra needless ;

Also.. ouch! This means we end up holding phydev->lock for up to ten
seconds, which prevents anything else happening with phylib during
that time. Not sure I can see a good way around that though. Andrew?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

  parent reply	other threads:[~2024-01-02 18:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-26 14:19 [PATCH v1 1/1] net: phy: micrel: Add workaround for incomplete autonegotiation Asmaa Mnebhi
2023-12-27 22:19 ` Marek Mojík
2024-01-02 18:45 ` Russell King (Oracle) [this message]
2024-01-03  1:27   ` Andrew Lunn
2024-01-19 18:11     ` Asmaa Mnebhi
2024-01-19 19:44       ` Andrew Lunn
2024-01-19 19:56         ` Andrew Lunn
2024-01-19 20:18         ` Asmaa Mnebhi
2024-01-19 22:38           ` Andrew Lunn
2024-01-19 22:57             ` Asmaa Mnebhi
2024-01-24 22:18               ` Asmaa Mnebhi
2024-01-19 23:14 ` 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=ZZRZvRKz6X61eUaH@shell.armlinux.org.uk \
    --to=linux@armlinux$(echo .)org.uk \
    --cc=asmaa@nvidia$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=davthompson@nvidia$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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