Re: [PATCH v2 2/2] net: phy: microchip: enable downshift by default on LAN88xx

From: Russell King (Oracle)

Date: Tue Mar 31 2026 - 07:33:27 EST


On Tue, Mar 31, 2026 at 12:46:27AM +0200, Nicolai Buchwitz wrote:
> Enable auto-downshift from 1000BASE-T to 100BASE-TX after 2 failed
> auto-negotiation attempts by default. This ensures that links with
> faulty or missing cable pairs (C and D) fall back to 100Mbps without
> requiring userspace configuration.
>
> Users can override or disable downshift at runtime:
>
> ethtool --set-phy-tunable eth0 downshift off
>
> Signed-off-by: Nicolai Buchwitz <nb@xxxxxxxxxxx>
> Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

I'm slightly concerned by this commit. ->config_init() is called when
the netdev attaches the PHY, and also during the resume path - and it's
the second one which I believe is a problem here.

If the user has configured the downshift, it is reasonable for the user
to expect the setting to be preserved over a suspend/resume. However,
by placing this code in ->config_init(), you will overwrite the user's
setting when the system resumes.

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