diff options
author | Ido Shamay <idos@mellanox.com> | 2014-05-14 12:15:11 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-14 15:40:33 -0400 |
commit | f5b6345ba8daf65a96ba4931c63624936908cf0f (patch) | |
tree | 02d5f76b0b1129e935b2feafed6afef868780630 /drivers | |
parent | 2eacc23c422b4553030168f315cb49522fa1b1f6 (diff) | |
download | linux-f5b6345ba8daf65a96ba4931c63624936908cf0f.tar.bz2 |
net/mlx4_en: User prio mapping gets corrupted when changing number of channels
When using ethtool set_channels, mlx4_en_setup_tc is always called, even
when it was not configured. Fixed code to call mlx4_en_setup_tc() only
if needed.
Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index c3736045e7af..a72d99fd7a2d 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -1151,7 +1151,8 @@ static int mlx4_en_set_channels(struct net_device *dev, netif_set_real_num_tx_queues(dev, priv->tx_ring_num); netif_set_real_num_rx_queues(dev, priv->rx_ring_num); - mlx4_en_setup_tc(dev, MLX4_EN_NUM_UP); + if (dev->num_tc) + mlx4_en_setup_tc(dev, MLX4_EN_NUM_UP); en_warn(priv, "Using %d TX rings\n", priv->tx_ring_num); en_warn(priv, "Using %d RX rings\n", priv->rx_ring_num); |