]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: realtek: read actual speed on rtl8211f to detect downshift
authorAntonio Borneo <antonio.borneo@st.com>
Tue, 24 Nov 2020 23:07:56 +0000 (00:07 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 25 Nov 2020 20:29:40 +0000 (12:29 -0800)
commitc71d3b0e504632b0442ef97763d353db354208a7
tree90e03d6a280a828652811271820e3643e22788cd
parent72b7ab8ba0df2b209b78002c30e434645029b9d7
net: phy: realtek: read actual speed on rtl8211f to detect downshift

The rtl8211f supports downshift and before commit 03efb164adbf
("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 0a91b7882c19 ("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>
drivers/net/phy/realtek.c