Skip to content

Commit 5aa957e

Browse files
321lipenggregkh
authored andcommitted
net: hns3: use netif_tx_disable to stop the transmit queue
[ Upstream commit b416e87 ] 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: 76ad4f0 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 90120c4 commit 5aa957e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/net/ethernet/hisilicon/hns3/hns3_enet.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,8 @@ static int hns3_nic_net_stop(struct net_device *netdev)
526526
if (h->ae_algo->ops->set_timer_task)
527527
h->ae_algo->ops->set_timer_task(priv->ae_handle, false);
528528

529-
netif_tx_stop_all_queues(netdev);
530529
netif_carrier_off(netdev);
530+
netif_tx_disable(netdev);
531531

532532
hns3_nic_net_down(netdev);
533533

0 commit comments

Comments
 (0)