Skip to content

Commit 1385cc8

Browse files
Yufeng Modavem330
authored andcommitted
net: hns3: fix vf reset workqueue cannot exit
The task of VF reset is performed through the workqueue. It checks the value of hdev->reset_pending to determine whether to exit the loop. However, the value of hdev->reset_pending may also be assigned by the interrupt function hclgevf_misc_irq_handle(), which may cause the loop fail to exit and keep occupying the workqueue. This loop is not necessary, so remove it and the workqueue will be rescheduled if the reset needs to be retried or a new reset occurs. Fixes: 1cc9bc6 ("net: hns3: split hclgevf_reset() into preparing and rebuilding part") Signed-off-by: Yufeng Mo <[email protected]> Signed-off-by: Guangbin Huang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 68752b2 commit 1385cc8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2273,9 +2273,9 @@ static void hclgevf_reset_service_task(struct hclgevf_dev *hdev)
22732273
hdev->reset_attempts = 0;
22742274

22752275
hdev->last_reset_time = jiffies;
2276-
while ((hdev->reset_type =
2277-
hclgevf_get_reset_level(hdev, &hdev->reset_pending))
2278-
!= HNAE3_NONE_RESET)
2276+
hdev->reset_type =
2277+
hclgevf_get_reset_level(hdev, &hdev->reset_pending);
2278+
if (hdev->reset_type != HNAE3_NONE_RESET)
22792279
hclgevf_reset(hdev);
22802280
} else if (test_and_clear_bit(HCLGEVF_RESET_REQUESTED,
22812281
&hdev->reset_state)) {

0 commit comments

Comments
 (0)