Commit c3b7c5c9 authored by Mohamad Haj Yahia's avatar Mohamad Haj Yahia Committed by David S. Miller

net/mlx5e: start/stop all tx queues upon open/close netdev

Start all tx queues (including inactive ones) when opening the netdev.
Stop all tx queues (including inactive ones) when closing the netdev.

This is a workaround for the tx timeout watchdog false alarm issue in
which the netdev watchdog is polling all the tx queues which may include
inactive queues and thus once lowering the real tx queues number
(ethtool -L) it will generate tx timeout watchdog false alarms.

Fixes: 3947ca18 ('net/mlx5e: Implement ndo_tx_timeout callback')
Signed-off-by: default avatarMohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2c1ccc99
...@@ -1348,6 +1348,11 @@ static int mlx5e_open_channels(struct mlx5e_priv *priv) ...@@ -1348,6 +1348,11 @@ static int mlx5e_open_channels(struct mlx5e_priv *priv)
goto err_close_channels; goto err_close_channels;
} }
/* FIXME: This is a W/A for tx timeout watch dog false alarm when
* polling for inactive tx queues.
*/
netif_tx_start_all_queues(priv->netdev);
kfree(cparam); kfree(cparam);
return 0; return 0;
...@@ -1367,6 +1372,12 @@ static void mlx5e_close_channels(struct mlx5e_priv *priv) ...@@ -1367,6 +1372,12 @@ static void mlx5e_close_channels(struct mlx5e_priv *priv)
{ {
int i; int i;
/* FIXME: This is a W/A only for tx timeout watch dog false alarm when
* polling for inactive tx queues.
*/
netif_tx_stop_all_queues(priv->netdev);
netif_tx_disable(priv->netdev);
for (i = 0; i < priv->params.num_channels; i++) for (i = 0; i < priv->params.num_channels; i++)
mlx5e_close_channel(priv->channel[i]); mlx5e_close_channel(priv->channel[i]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment