Subject: Re: [PATCH v1 1/1] net: phy: micrel: Add workaround for incomplete autonegotiation

From: "Russell King (Oracle)" <[email-masked]>
Date: Tue, 2 Jan 2024 18:45:17 +0000

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!