summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon
diff options
context:
space:
mode:
authorYufeng Mo <moyufeng@huawei.com>2021-04-30 11:06:22 +0200
committerDavid S. Miller <davem@davemloft.net>2021-04-30 23:49:33 +0200
commit472497d0bdae890a896013332a0b673f9acdf2bf (patch)
treea42f82f9dea02a2f2ae77865b1037e4bbb3daee7 /drivers/net/ethernet/hisilicon
parentnet: hns3: clear unnecessary reset request in hclge_reset_rebuild (diff)
downloadlinux-472497d0bdae890a896013332a0b673f9acdf2bf.tar.xz
linux-472497d0bdae890a896013332a0b673f9acdf2bf.zip
net: hns3: disable phy loopback setting in hclge_mac_start_phy
If selftest and reset are performed at the same time, the phy loopback setting may be still in enable state after the reset, and device cannot link up. So fix this issue by disabling phy loopback before phy_start(). Fixes: 256727da7395 ("net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC") Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
index 08e88d9422cd..1231c34f0949 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
@@ -255,6 +255,8 @@ void hclge_mac_start_phy(struct hclge_dev *hdev)
if (!phydev)
return;
+ phy_loopback(phydev, false);
+
phy_start(phydev);
}