int reg;
u32 val;
+ /* not sure about this one, but without it we get a "ghost" internal SERDES on addr 63 which causes breakage
+ * [ 3.076655] rtl8393_serdes_probe: id: 63
+ * [ 3.081135] Realtek RTL8393 SERDES rtl838x slave mii-0:3f: Detected internal RTL8390 SERDES
+ */
+ if (phy_addr > RTL839X_CPU_PORT)
+ return -EIO;
+
if (phy_addr == 49)
offset = 0x100;
int addr = phydev->mdio.addr;
int ret = 0;
- /* 839x has internal SerDes */
- if (soc_info.id == 0x8393)
- return -ENODEV;
-
/* All base addresses of the PHYs start at multiples of 8 */
devm_phy_package_join(dev, phydev, addr & (~7),
sizeof(struct rtl83xx_shared_private));
if (!(addr % 8)) {
struct rtl83xx_shared_private *shared = phydev->shared->priv;
shared->name = "RTL8214FC";
- /* Configuration must be done while patching still possible */
- ret = rtl8380_configure_rtl8214fc(phydev);
- if (ret)
- return ret;
+ if (soc_info.id != 0x8393) {
+ /* Configuration must be done while patching still possible */
+ ret = rtl8380_configure_rtl8214fc(phydev);
+ if (ret)
+ return ret;
+ }
}
return phy_sfp_probe(phydev, &rtl8214fc_sfp_ops);