Skip to content

Commit 51992c8

Browse files
jonasjelonekhauke
authored andcommitted
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 <jelonek.jonas@gmail.com> Signed-off-by: Sven Eckelmann <sven@narfation.org> Link: openwrt/openwrt#23076 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
1 parent dd5bd85 commit 51992c8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • target/linux/generic/files/drivers/net/phy/rtl8261n

target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ static int rtkphy_config_init(struct phy_device *phydev)
8181

8282
#if 1 /* toggle reset */
8383
phy_modify_mmd_changed(phydev, 30, 0x145, BIT(0) , 1);
84+
mdelay(30);
8485
phy_modify_mmd_changed(phydev, 30, 0x145, BIT(0) , 0);
8586
mdelay(30);
8687
#endif

0 commit comments

Comments
 (0)