net: hns3: Add nic state check before calling netif_tx_wake_queue
authorJian Shen <shenjian15@huawei.com>
Fri, 21 Sep 2018 15:41:43 +0000 (16:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:26 +0000 (11:08 -0800)
commit118f36c16c4f9e50c5d0ae9945119d630ed0232f
tree8ee11395b4178ccffcd238bf5841dc403c8c4f2a
parent0e79c6b664a7f192cef5ad46cef7c3d6fe914f40
net: hns3: Add nic state check before calling netif_tx_wake_queue

[ Upstream commit 7a8101109dd37837f587cd56f3111d4fc17a07f5 ]

When nic down, it firstly calls netif_tx_stop_all_queues(), then calls
napi_disable(). But napi_disable() will wait current napi_poll finish,
it may call netif_tx_wake_queue(). This patch fixes it by add nic state
checking.

Fixes: 424eb834a9be ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC")
Signed-off-by: Jian Shen <shenjian15@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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c