]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix for service_task not running problem after resetting
authorYunsheng Lin <linyunsheng@huawei.com>
Fri, 1 Jun 2018 16:52:05 +0000 (17:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Jun 2018 18:23:56 +0000 (14:23 -0400)
commit12199d730dd4970a1a04a72dc2e66f7d518a5ea1
tree45862d6da080ceb20b0c07a77b20625537a6aac3
parentcf3e4446e78a50647b7a7a7a9b477bc19c59cc79
net: hns3: Fix for service_task not running problem after resetting

When hclge_ae_stop is called during resetting, it will cancel the
service_task by calling cancel_work_sync, which may cause the
service_task to exit without clearing HCLGE_STATE_SERVICE_SCHED
bit. If this happens, the service_task will never run again.

This patch fixes this problem by clearing it after calling
cancel_work_sync in hclge_ae_stop.

Fixes: 22c0e2ce21dd ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c