summaryrefslogtreecommitdiff
path: root/drivers/net/phy/realtek.c
diff options
context:
space:
mode:
authorAntonio Borneo <antonio.borneo@st.com>2020-11-25 02:07:56 +0300
committerJakub Kicinski <kuba@kernel.org>2020-11-25 23:29:40 +0300
commit4826d2c4fcbfcc3ba7887a197143ffe4d444a3d3 (patch)
tree90e03d6a280a828652811271820e3643e22788cd /drivers/net/phy/realtek.c
parent16d07c38c4468d0006ecf927453c6c4a4de32073 (diff)
downloadlinux-4826d2c4fcbfcc3ba7887a197143ffe4d444a3d3.tar.xz
net: phy: realtek: read actual speed on rtl8211f to detect downshift
The rtl8211f supports downshift and before commit 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status") the read-back of register MII_CTRL1000 was used to detect the negotiated link speed. The code added in commit d445dff2df60 ("net: phy: realtek: read actual speed to detect downshift") is working fine also for this phy and it's trivial re-using it to restore the downshift detection on rtl8211f. Add the phy specific read_status() pointing to the existing function rtlgen_read_status(). Signed-off-by: Antonio Borneo <antonio.borneo@st.com> Link: https://lore.kernel.org/r/478f871a-583d-01f1-9cc5-2eea56d8c2a7@huawei.com Tested-by: Yonglong Liu <liuyonglong@huawei.com> Link: https://lore.kernel.org/r/20201124230756.887925-1-antonio.borneo@st.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy/realtek.c')
-rw-r--r--drivers/net/phy/realtek.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index f71eda945c6a..99ecd6c4c15a 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -729,6 +729,7 @@ static struct phy_driver realtek_drvs[] = {
PHY_ID_MATCH_EXACT(0x001cc916),
.name = "RTL8211F Gigabit Ethernet",
.config_init = &rtl8211f_config_init,
+ .read_status = rtlgen_read_status,
.config_intr = &rtl8211f_config_intr,
.handle_interrupt = rtl8211f_handle_interrupt,
.suspend = genphy_suspend,