From: Maxim Mikityanskiy Date: Tue, 25 Jan 2022 10:52:48 +0000 (+0200) Subject: net/mlx5e: Disable TX queues before registering the netdev X-Git-Tag: v5.15.73~5263 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c64f3707cdf9347db765cdc68091751a60da5bd1;p=platform%2Fkernel%2Flinux-rpi.git net/mlx5e: Disable TX queues before registering the netdev [ Upstream commit d08c6e2a4d0308a7922d7ef3b1b3af45d4096aad ] Normally, the queues are disabled when the channels are deactivated, and enabled when the channels are activated. However, on register, the channels are not active, but the queues are enabled by default. This change fixes it, preventing mlx5e_xmit from running when the channels are deactivated in the beginning. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index f075bb8..01301be 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -4914,6 +4914,7 @@ mlx5e_create_netdev(struct mlx5_core_dev *mdev, const struct mlx5e_profile *prof } netif_carrier_off(netdev); + netif_tx_disable(netdev); dev_net_set(netdev, mlx5_core_net(mdev)); return netdev;