[PATCH] net: hns3: fix for ping failed when resume from s3 or s4

When resume from s3 or s4, the mac table will lose, and the network will be broken. This patch adds mac table restore operation to fix this problem. Fixes: 3fc746a2967a ("net: hns3: add suspend/resume function for hns3 driver") Signed-off-by: Yonglong Liu <liuyonglong@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 478a3b5..d7da2c8 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -3864,6 +3864,10 @@ static int hclge_resume(struct hnae3_ae_dev *ae_dev) if (ret) goto err_reset_lock; + ret = hclge_notify_client(hdev, HNAE3_RESTORE_CLIENT); + if (ret) + goto err_reset_lock; + rtnl_unlock(); ret = hclge_notify_roce_client(hdev, HNAE3_INIT_CLIENT); -- 2.8.1
participants (1)
-
Yonglong Liu