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

From: Nicolai Buchwitz

Date: Mon Mar 30 2026 - 18:48:47 EST


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>
---
drivers/net/phy/microchip.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/microchip.c b/drivers/net/phy/microchip.c
index bc293d2dd130..802b8a6e54e6 100644
--- a/drivers/net/phy/microchip.c
+++ b/drivers/net/phy/microchip.c
@@ -346,7 +346,7 @@ static void lan88xx_set_mdix(struct phy_device *phydev)

static int lan88xx_config_init(struct phy_device *phydev)
{
- int val;
+ int val, err;

/*Zerodetect delay enable */
val = phy_read_mmd(phydev, MDIO_MMD_PCS,
@@ -359,6 +359,11 @@ static int lan88xx_config_init(struct phy_device *phydev)
/* Config DSP registers */
lan88xx_config_TR_regs(phydev);

+ /* Enable downshift after 2 failed attempts by default */
+ err = lan88xx_set_downshift(phydev, 2);
+ if (err < 0)
+ return err;
+
return 0;
}

--
2.51.0