From: Huazhong Tan Date: Sat, 6 Apr 2019 07:43:33 +0000 (+0800) Subject: net: hns3: stop mailbox handling when command queue need re-init X-Git-Tag: Ubuntu-5.2.0-15.16~2001^2~213^2~3 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=18e2488881c61957b8fc1a25c0bb8419e25ddb6f;p=mirror_ubuntu-eoan-kernel.git 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 Signed-off-by: Peng Li Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 1c93da2bcb4b..11d9739caea5 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -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); }