Commit d787726d authored by Yufeng Mo's avatar Yufeng Mo Committed by Hao Chen
Browse files

net: phy: add set_loopback interface to realtek phy driver

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAFOMC


CVE: NA

--------------------------------------------------------

When using Ubuntu OS, the realtek phy driver is loaded by default
instead of the generic PHY driver. However, the set_loopback
interface is not added to the realtek phy driver. As a result,
the phy selftest fails.

This patch adds the set_loopback interface to the realtek phy driver
so that the phy selftest can run properly.

Fixes: 46a3df9f ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")

Signed-off-by: default avatarYufeng Mo <moyufeng@huawei.com>
Reviewed-by: default avatarlipeng <lipeng321@huawei.com>
Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
parent b057ca57
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -695,6 +695,7 @@ static struct phy_driver realtek_drvs[] = {
		.resume		= rtl821x_resume,
		.read_page	= rtl821x_read_page,
		.write_page	= rtl821x_write_page,
		.set_loopback   = genphy_loopback,
	}, {
		.name		= "Generic FE-GE Realtek PHY",
		.match_phy_device = rtlgen_match_phy_device,