Skip to content

Commit e9a828b

Browse files
IronShenNipaLocal
authored andcommitted
net: hns3: initialize reset_timer before hclgevf_misc_irq_init()
Currently the misc irq is initialized before reset_timer setup. But it will access the reset_timer in the irq handler. So initialize the reset_timer earlier. Fixes: ff20009 ("net: hns3: remove unnecessary work in hclgevf_main") Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Jijie Shao <shaojijie@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: NipaLocal <nipa@local>
1 parent f46c9cd commit e9a828b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2313,6 +2313,7 @@ static void hclgevf_state_init(struct hclgevf_dev *hdev)
23132313
clear_bit(HCLGEVF_STATE_RST_FAIL, &hdev->state);
23142314

23152315
INIT_DELAYED_WORK(&hdev->service_task, hclgevf_service_task);
2316+
timer_setup(&hdev->reset_timer, hclgevf_reset_timer, 0);
23162317

23172318
mutex_init(&hdev->mbx_resp.mbx_mutex);
23182319
sema_init(&hdev->reset_sem, 1);
@@ -3012,7 +3013,6 @@ static int hclgevf_init_hdev(struct hclgevf_dev *hdev)
30123013
HCLGEVF_DRIVER_NAME);
30133014

30143015
hclgevf_task_schedule(hdev, round_jiffies_relative(HZ));
3015-
timer_setup(&hdev->reset_timer, hclgevf_reset_timer, 0);
30163016

30173017
return 0;
30183018

0 commit comments

Comments
 (0)