]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: use netif_tx_disable to stop the transmit queue
authorPeng Li <lipeng321@huawei.com>
Fri, 30 Apr 2021 09:06:20 +0000 (17:06 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Apr 2021 21:49:33 +0000 (14:49 -0700)
commitd37057b9380ddbfe8cb87127025506b7f5d9db32
tree3fec2d3188517cdbf12f738161ca321497ce323b
parent62850857b8d25ee08f23fa3d73e434a02d21e79b
net: hns3: use netif_tx_disable to stop the transmit queue

Currently, netif_tx_stop_all_queues() is used to ensure that
the xmit is not running, but for the concurrent case it will
not take effect, since netif_tx_stop_all_queues() just sets
a flag without locking to indicate that the xmit queue(s)
should not be run.

So use netif_tx_disable() to replace netif_tx_stop_all_queues(),
it takes the xmit queue lock while marking the queue stopped.

Fixes: 327a841d1dd9 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Peng Li <lipeng321@huawei.com>
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