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
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>
  • Loading branch information
Yufeng Mo authored and davem330 committed Apr 30, 2021
1 parent 8c9200e commit 472497d
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
Original file line number Diff line number Diff line change
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 472497d

Please sign in to comment.