From: Sven Eckelmann Date: Fri, 24 Apr 2026 06:50:21 +0000 (+0200) Subject: kernel: rtl8261n: always configure as USXGMII X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=dd5bd85a1ffbef075eb32c35e63d6e6eb1277982;p=thirdparty%2Fopenwrt.git kernel: rtl8261n: always configure as USXGMII In the past, all the configuration of SerDes and PHYs on the realtek switches were done using u-boot (`rtk init`). But since RTL930x switched to SerDes configuration under Linux, the SoC side is no longer using the Realtek-proprietary variant of USXGMII. The communication to the RTL8261N PHYs on those switches broke because of this incompatibility. Enabling the full initialization on `CONFIG_MACH_REALTEK_RTL` converts also the PHY side to the standard USXGMII and therefore ensures that both sides speak the same dialect. Co-authored-by: Jonas Jelonek Signed-off-by: Sven Eckelmann Link: https://github.com/openwrt/openwrt/pull/23076 Signed-off-by: Hauke Mehrtens --- 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 8c142afee60..7307bd30adc 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 @@ -78,9 +78,6 @@ static int rtkphy_config_init(struct phy_device *phydev) case REALTEK_PHY_ID_RTL8264B: case REALTEK_PHY_ID_RTL8264: phydev_info(phydev, "%s:%u [RTL8261N/RTL8264/RTL826XB] phy_id: 0x%X PHYAD:%d\n", __FUNCTION__, __LINE__, phydev->drv->phy_id, phydev->mdio.addr); -#ifdef CONFIG_MACH_REALTEK_RTL - return 0; -#endif #if 1 /* toggle reset */ phy_modify_mmd_changed(phydev, 30, 0x145, BIT(0) , 1);