Commit 39f17b44 authored by Yevgeny Petrilin's avatar Yevgeny Petrilin Committed by David S. Miller

mlx4_en: moderation parameters are not reseted.

Instead of reseting the module parameters each ifup or mtu change,
they are being set once at device initialization
Signed-off-by: default avatarYevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b6055006
...@@ -801,7 +801,6 @@ static int mlx4_en_open(struct net_device *dev) ...@@ -801,7 +801,6 @@ static int mlx4_en_open(struct net_device *dev)
priv->rx_ring[i].packets = 0; priv->rx_ring[i].packets = 0;
} }
mlx4_en_set_default_moderation(priv);
err = mlx4_en_start_port(dev); err = mlx4_en_start_port(dev);
if (err) if (err)
en_err(priv, "Failed starting port:%d\n", priv->port); en_err(priv, "Failed starting port:%d\n", priv->port);
...@@ -932,7 +931,6 @@ static int mlx4_en_change_mtu(struct net_device *dev, int new_mtu) ...@@ -932,7 +931,6 @@ static int mlx4_en_change_mtu(struct net_device *dev, int new_mtu)
en_dbg(DRV, priv, "Change MTU called with card down!?\n"); en_dbg(DRV, priv, "Change MTU called with card down!?\n");
} else { } else {
mlx4_en_stop_port(dev); mlx4_en_stop_port(dev);
mlx4_en_set_default_moderation(priv);
err = mlx4_en_start_port(dev); err = mlx4_en_start_port(dev);
if (err) { if (err) {
en_err(priv, "Failed restarting port:%d\n", en_err(priv, "Failed restarting port:%d\n",
...@@ -1080,6 +1078,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, ...@@ -1080,6 +1078,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num); en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num);
priv->registered = 1; priv->registered = 1;
mlx4_en_set_default_moderation(priv);
queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY); queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY);
return 0; return 0;
......
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