Skip to content

Commit

Permalink
net: hns3: clear VF down state bit before request link status
Browse files Browse the repository at this point in the history
Currently, the VF down state bit is cleared after VF sending
link status request command. There is problem that when VF gets
link status replied from PF, the down state bit may still set
as 1. In this case, the link status replied from PF will be
ignored and always set VF link status to down.

To fix this problem, clear VF down state bit before VF requests
link status.

Fixes: e2cb1de ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Guangbin Huang authored and David S. Miller committed Apr 6, 2021
1 parent f57796a commit ed7bedd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2624,14 +2624,14 @@ static int hclgevf_ae_start(struct hnae3_handle *handle)
{
struct hclgevf_dev *hdev = hclgevf_ae_get_hdev(handle);

clear_bit(HCLGEVF_STATE_DOWN, &hdev->state);

hclgevf_reset_tqp_stats(handle);

hclgevf_request_link_info(hdev);

hclgevf_update_link_mode(hdev);

clear_bit(HCLGEVF_STATE_DOWN, &hdev->state);

return 0;
}

Expand Down

0 comments on commit ed7bedd

Please sign in to comment.