Skip to content

Commit

Permalink
net: hns3: change the order of reinitializing RoCE and NIC client dur…
Browse files Browse the repository at this point in the history
…ing reset

The HNS RDMA driver will support VF device later, whose
re-initialization should be done after PF's. This patch
changes the order of hclge_reset_prepare_up() and
hclge_notify_roce_client(), so that PF's RoCE client
will be reinitialized before VF's.

Signed-off-by: Yufeng Mo <[email protected]>
Signed-off-by: Huazhong Tan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Yufeng Mo authored and davem330 committed May 27, 2020
1 parent 4cd5bea commit 60c800c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3770,11 +3770,6 @@ static int hclge_reset_rebuild(struct hclge_dev *hdev)

hclge_clear_reset_cause(hdev);

ret = hclge_reset_prepare_up(hdev);
if (ret)
return ret;


ret = hclge_notify_roce_client(hdev, HNAE3_INIT_CLIENT);
/* ignore RoCE notify error if it fails HCLGE_RESET_MAX_FAIL_CNT - 1
* times
Expand All @@ -3783,6 +3778,10 @@ static int hclge_reset_rebuild(struct hclge_dev *hdev)
hdev->rst_stats.reset_fail_cnt < HCLGE_RESET_MAX_FAIL_CNT - 1)
return ret;

ret = hclge_reset_prepare_up(hdev);
if (ret)
return ret;

rtnl_lock();
ret = hclge_notify_client(hdev, HNAE3_UP_CLIENT);
rtnl_unlock();
Expand Down

0 comments on commit 60c800c

Please sign in to comment.