From: Stijn Tintel Date: Thu, 18 Apr 2024 14:53:58 +0000 (+0300) Subject: realtek: rtl839x: support rtl8214fc on rtl8393 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4ea41c200c563267311a8c5b48f85c400d5feccc;p=openwrt%2Fstaging%2Fstintel.git realtek: rtl839x: support rtl8214fc on rtl8393 Returning ENODEV in rtl8214fc_phy_probe when an RTL8393 SoC is detected makes it impossible to use an external RTL8214FC PHY on the SoC. Instead, --- diff --git a/target/linux/realtek/files-5.15/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-5.15/drivers/net/phy/rtl83xx-phy.c index 1397278643..6b8738f2b9 100644 --- a/target/linux/realtek/files-5.15/drivers/net/phy/rtl83xx-phy.c +++ b/target/linux/realtek/files-5.15/drivers/net/phy/rtl83xx-phy.c @@ -3684,6 +3684,9 @@ static int rtl8214fc_phy_probe(struct phy_device *phydev) devm_phy_package_join(dev, phydev, addr & (~7), sizeof(struct rtl83xx_shared_private)); + if (soc_info.id == 0x8393) + return phy_sfp_probe(phydev, &rtl8214fc_sfp_ops); + if (!(addr % 8)) { struct rtl83xx_shared_private *shared = phydev->shared->priv; shared->name = "RTL8214FC";