Skip to content

Commit d1c2e29

Browse files
IronShenPaolo Abeni
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 <[email protected]> Signed-off-by: Jijie Shao <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 5f62009 commit d1c2e29

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
@@ -2315,6 +2315,7 @@ static void hclgevf_state_init(struct hclgevf_dev *hdev)
23152315
clear_bit(HCLGEVF_STATE_RST_FAIL, &hdev->state);
23162316

23172317
INIT_DELAYED_WORK(&hdev->service_task, hclgevf_service_task);
2318+
timer_setup(&hdev->reset_timer, hclgevf_reset_timer, 0);
23182319

23192320
mutex_init(&hdev->mbx_resp.mbx_mutex);
23202321
sema_init(&hdev->reset_sem, 1);
@@ -3014,7 +3015,6 @@ static int hclgevf_init_hdev(struct hclgevf_dev *hdev)
30143015
HCLGEVF_DRIVER_NAME);
30153016

30163017
hclgevf_task_schedule(hdev, round_jiffies_relative(HZ));
3017-
timer_setup(&hdev->reset_timer, hclgevf_reset_timer, 0);
30183018

30193019
return 0;
30203020

0 commit comments

Comments
 (0)