Skip to content

Commit

Permalink
net: hns3: disable phy loopback setting in hclge_mac_start_phy
Browse files Browse the repository at this point in the history
[ Upstream commit 472497d ]

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: 256727d ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Yufeng Mo authored and gregkh committed May 19, 2021
1 parent 5aa957e commit 6508488
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
Expand Up @@ -255,6 +255,8 @@ void hclge_mac_start_phy(struct hclge_dev *hdev)
if (!phydev)
return;

phy_loopback(phydev, false);

phy_start(phydev);
}

Expand Down

0 comments on commit 6508488

Please sign in to comment.