OSDN Git Service

net: hns3: add management table after IMP reset
authorYufeng Mo <moyufeng@huawei.com>
Fri, 14 Feb 2020 01:53:41 +0000 (09:53 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Feb 2020 15:05:17 +0000 (07:05 -0800)
In the current process, the management table is missing after the
IMP reset. This patch adds the management table to the reset process.

Fixes: f5aac71c0327 ("net: hns3: add manager table initialization for hardware")
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>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index ec5f6ee..25ac573 100644 (file)
@@ -9834,6 +9834,13 @@ static int hclge_reset_ae_dev(struct hnae3_ae_dev *ae_dev)
                return ret;
        }
 
+       ret = init_mgr_tbl(hdev);
+       if (ret) {
+               dev_err(&pdev->dev,
+                       "failed to reinit manager table, ret = %d\n", ret);
+               return ret;
+       }
+
        ret = hclge_init_fd_config(hdev);
        if (ret) {
                dev_err(&pdev->dev, "fd table init fail, ret=%d\n", ret);