Skip to content

Commit b416e87

Browse files
321lipengdavem330
authored andcommitted
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: 76ad4f0 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Peng Li <[email protected]> Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 905416f commit b416e87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

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

578-
netif_tx_stop_all_queues(netdev);
579578
netif_carrier_off(netdev);
579+
netif_tx_disable(netdev);
580580

581581
hns3_nic_net_down(netdev);
582582

0 commit comments

Comments
 (0)