net: hns3: fix for pause configuration lost during reset
authorYunsheng Lin <linyunsheng@huawei.com>
Fri, 9 Mar 2018 02:36:59 +0000 (10:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Mar 2018 16:33:14 +0000 (11:33 -0500)
Pause configuration will be set to default value by hclge_tm_schd_init
during reset, which causes the RSS configuration loss problem.

This patch fixes it by calling hclge_tm_init_hw during reset process
, which will set the pause configuration to default value.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index 34a09057e7c818bf576741e4ed2bd2a59fb305df..109155de86ee3942c424111723240042fce86d96 100644 (file)
@@ -5493,9 +5493,9 @@ static int hclge_reset_ae_dev(struct hnae3_ae_dev *ae_dev)
                return ret;
        }
 
-       ret = hclge_tm_schd_init(hdev);
+       ret = hclge_tm_init_hw(hdev);
        if (ret) {
-               dev_err(&pdev->dev, "tm schd init fail, ret =%d\n", ret);
+               dev_err(&pdev->dev, "tm init hw fail, ret =%d\n", ret);
                return ret;
        }