summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon
diff options
context:
space:
mode:
authorJian Shen2019-06-20 10:52:38 +0200
committerDavid S. Miller2019-06-26 17:59:01 +0200
commitd736fc6c68a5f76e89a6c2c4100e3678706003a3 (patch)
treea82884d9d0e1fc4f4f831f3572ddc8023a59c1ea /drivers/net/ethernet/hisilicon
parentnet: hns3: sync VLAN filter entries when kill VLAN ID failed (diff)
downloadkernel-qcow2-linux-d736fc6c68a5f76e89a6c2c4100e3678706003a3.tar.gz
kernel-qcow2-linux-d736fc6c68a5f76e89a6c2c4100e3678706003a3.tar.xz
kernel-qcow2-linux-d736fc6c68a5f76e89a6c2c4100e3678706003a3.zip
net: hns3: restore the MAC autoneg state after reset
When doing global reset, the MAC autoneg state of fibre port is set to default, which may cause user configuration lost. This patch fixes it by restore the MAC autoneg state after reset. Fixes: 22f48e24a23d ("net: hns3: add autoneg and change speed support for fibre port") Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Peng Li <lipeng321@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_main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 6e978375c439..0772ca176d93 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -2400,6 +2400,15 @@ static int hclge_mac_init(struct hclge_dev *hdev)
return ret;
}
+ if (hdev->hw.mac.support_autoneg) {
+ ret = hclge_set_autoneg_en(hdev, hdev->hw.mac.autoneg);
+ if (ret) {
+ dev_err(&hdev->pdev->dev,
+ "Config mac autoneg fail ret=%d\n", ret);
+ return ret;
+ }
+ }
+
mac->link = 0;
if (mac->user_fec_mode & BIT(HNAE3_FEC_USER_DEF)) {