realtek: rtl839x: support rtl8214fc on rtl8393
authorStijn Tintel <stijn@linux-ipv6.be>
Thu, 18 Apr 2024 14:53:58 +0000 (17:53 +0300)
committerStijn Tintel <stijn@linux-ipv6.be>
Tue, 7 May 2024 14:55:43 +0000 (17:55 +0300)
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,

target/linux/realtek/files-5.15/drivers/net/phy/rtl83xx-phy.c

index 13972786438f00384416587eccd437c9fefeae32..6b8738f2b981ea778be74f53ad2f1d0f81ad995c 100644 (file)
@@ -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";