net: hns3: stop mailbox handling when command queue need re-init
If the command queue needs re-initialization, the mailbox handling task should do nothing, otherwise this task will just get some error print. Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
cf1f212916
commit
18e2488881
@ -2164,7 +2164,8 @@ static int hclge_mac_init(struct hclge_dev *hdev)
|
||||
|
||||
static void hclge_mbx_task_schedule(struct hclge_dev *hdev)
|
||||
{
|
||||
if (!test_and_set_bit(HCLGE_STATE_MBX_SERVICE_SCHED, &hdev->state))
|
||||
if (!test_bit(HCLGE_STATE_CMD_DISABLE, &hdev->state) &&
|
||||
!test_and_set_bit(HCLGE_STATE_MBX_SERVICE_SCHED, &hdev->state))
|
||||
schedule_work(&hdev->mbx_service_task);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user