Skip to content

Commit bd3cadd

Browse files
Jie WangPaolo Abeni
authored andcommitted
net: hns3: add cmdq check for vf periodic service task
When the vf cmdq is disabled, there is no need to keep these task running. So this patch skip these task when the cmdq is disabled. Fixes: ff20009 ("net: hns3: remove unnecessary work in hclgevf_main") Signed-off-by: Jie Wang <[email protected]> Signed-off-by: Jijie Shao <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 8070274 commit bd3cadd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,8 @@ static void hclgevf_periodic_service_task(struct hclgevf_dev *hdev)
18551855
unsigned long delta = round_jiffies_relative(HZ);
18561856
struct hnae3_handle *handle = &hdev->nic;
18571857

1858-
if (test_bit(HCLGEVF_STATE_RST_FAIL, &hdev->state))
1858+
if (test_bit(HCLGEVF_STATE_RST_FAIL, &hdev->state) ||
1859+
test_bit(HCLGE_COMM_STATE_CMD_DISABLE, &hdev->hw.hw.comm_state))
18591860
return;
18601861

18611862
if (time_is_after_jiffies(hdev->last_serv_processed + HZ)) {

0 commit comments

Comments
 (0)