aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiddharth Vadapalli <s-vadapalli@ti.com>2024-02-20 12:30:07 +0530
committerPaolo Abeni <pabeni@redhat.com>2024-02-22 09:53:54 +0100
commit3489182b11d35f1944c1245fc9c4867cf622c50f (patch)
tree302b55140828897b4db04bd5c3be3e7eaedacd01
parent39a4cd5a3a32fe61716cfcaae1a01f9e5ee4971c (diff)
downloadlinux-3489182b11d35f1944c1245fc9c4867cf622c50f.tar.gz
net: phy: realtek: Fix rtl8211f_config_init() for RTL8211F(D)(I)-VD-CG PHY
Commit bb726b753f75 ("net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG") extended support of the driver from the existing support for RTL8211F(D)(I)-CG PHY to the newer RTL8211F(D)(I)-VD-CG PHY. While that commit indicated that the RTL8211F_PHYCR2 register is not supported by the "VD-CG" PHY model and therefore updated the corresponding section in rtl8211f_config_init() to be invoked conditionally, the call to "genphy_soft_reset()" was left as-is, when it should have also been invoked conditionally. This is because the call to "genphy_soft_reset()" was first introduced by the commit 0a4355c2b7f8 ("net: phy: realtek: add dt property to disable CLKOUT clock") since the RTL8211F guide indicates that a PHY reset should be issued after setting bits in the PHYCR2 register. As the PHYCR2 register is not applicable to the "VD-CG" PHY model, fix the rtl8211f_config_init() function by invoking "genphy_soft_reset()" conditionally based on the presence of the "PHYCR2" register. Fixes: bb726b753f75 ("net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG") Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20240220070007.968762-1-s-vadapalli@ti.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Notes
Fixes: bb726b753f75 ("net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG") # v6.1-rc1 Stable: c7818378953d # v6.6.19 Stable: b9196289e36c # v6.1.80 Lore: https://lore.kernel.org/r/20240220070007.968762-1-s-vadapalli@ti.com # linux-arm-kernel, lkml, netdev Lore: https://lore.kernel.org/r/20240227131616.378923934@linuxfoundation.org # linux-patches, stable Lore: https://lore.kernel.org/r/20240227131634.849880262@linuxfoundation.org # linux-patches, stable Lore: https://lore.kernel.org/r/20240227131641.424978510@linuxfoundation.org # linux-patches, stable
-rw-r--r--drivers/net/phy/realtek.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 894172a3e15fe8..337899c69738ec 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -421,9 +421,11 @@ static int rtl8211f_config_init(struct phy_device *phydev)
ERR_PTR(ret));
return ret;
}
+
+ return genphy_soft_reset(phydev);
}
- return genphy_soft_reset(phydev);
+ return 0;
}
static int rtl821x_suspend(struct phy_device *phydev)