net: hns3: stop napi polling when HNS3_NIC_STATE_DOWN is set
authorHuazhong Tan <tanhuazhong@huawei.com>
Fri, 9 Nov 2018 14:07:52 +0000 (22:07 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Nov 2018 00:47:35 +0000 (16:47 -0800)
commitff0699e04b977b61c5505cdfa5a386b9bceb3e6d
tree4f13cd3aa733d1a4545c5559cfd1181aee625efe
parent6a5f6fa382f3f4d5f519a9a52ed63afb4841fc0c
net: hns3: stop napi polling when HNS3_NIC_STATE_DOWN is set

When calling napi_disable during reset down process, if NAPIF_STATE_MISSED
is set, napi_complete will call __napi_schedule to do the polling again.
So this patch uses HNS3_NIC_STATE_DOWN to ensure the polling is not
scheduled again.

Also, when napi_complete returns true, it means polling is scheduled
again, it is not neccssary to enable the interrupt.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c