From 51992c87c8d1cee54cffa3eacf7f15e6afd48b1c Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Fri, 24 Apr 2026 11:07:34 +0200 Subject: [PATCH] kernel: rtl8261n: add post-reset MDIO stabilization delay After the RTL8261N asserts a reset, the MDIO bus becomes temporarily unavailable during the chip's reinitialization sequence. Any subsequent read or write issued before the PHY has stabilized will fail. Add a 30ms delay after triggering the reset to ensure the chip is reachable via MDIO before resuming communication. Signed-off-by: Jonas Jelonek Signed-off-by: Sven Eckelmann Link: https://github.com/openwrt/openwrt/pull/23076 Signed-off-by: Hauke Mehrtens --- target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c b/target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c index 7307bd30ad..925f2b3a29 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c @@ -81,6 +81,7 @@ static int rtkphy_config_init(struct phy_device *phydev) #if 1 /* toggle reset */ phy_modify_mmd_changed(phydev, 30, 0x145, BIT(0) , 1); + mdelay(30); phy_modify_mmd_changed(phydev, 30, 0x145, BIT(0) , 0); mdelay(30); #endif