]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix napi_disable not return problem
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 18 Dec 2018 11:37:50 +0000 (19:37 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Dec 2018 20:01:01 +0000 (12:01 -0800)
commit4f72fc9c0766db5355af2c9a19ea76924162efa5
tree63518061d8e3bc750fabe553d62eabb8be0333a7
parent0c87d673d09479e7964d23a335b363a3c7d34e10
net: hns3: fix napi_disable not return problem

While doing DOWN, the calling of napi_disable() may not return, since the
napi_complete() in the hns3_nic_common_poll() will never be called when
HNS3_NIC_STATE_DOWN is set. So we need to call napi_complete() before
checking HNS3_NIC_STETE_DOWN.

Fixes: bb9ef6527b85 ("net: hns3: stop napi polling when HNS3_NIC_STATE_DOWN is set")
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>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c