Skip to content

Commit

Permalink
net: hns3: set VF's default reset_type to HNAE3_NONE_RESET
Browse files Browse the repository at this point in the history
reset_type means what kind of reset the driver is handling now,
so after initializing or reset, the reset_type of VF should be
set to HNAE3_NONE_RESET, otherwise, this unknown default value
may be a little misleading when the device is running.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Huazhong Tan authored and David S. Miller committed Jan 21, 2020
1 parent 08bb385 commit afb6afd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1862,6 +1862,7 @@ static void hclgevf_reset_service_task(struct hclgevf_dev *hdev)
hclgevf_reset_task_schedule(hdev);
}

hdev->reset_type = HNAE3_NONE_RESET;
clear_bit(HCLGEVF_STATE_RST_HANDLING, &hdev->state);
up(&hdev->reset_sem);
}
Expand Down Expand Up @@ -2742,6 +2743,7 @@ static int hclgevf_init_hdev(struct hclgevf_dev *hdev)

hclgevf_state_init(hdev);
hdev->reset_level = HNAE3_VF_FUNC_RESET;
hdev->reset_type = HNAE3_NONE_RESET;

ret = hclgevf_misc_irq_init(hdev);
if (ret) {
Expand Down

0 comments on commit afb6afd

Please sign in to comment.