diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2011-03-22 18:37:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-23 15:24:16 -0400 |
commit | 39f17b44aaaa6bc47ded0bbb17fc617ec6cf08bb (patch) | |
tree | ddecf64c22e301943e2d3f29439174c35c492a09 /drivers/net/mlx4 | |
parent | b6055006b26de15aaa66870809b3d63b334737ce (diff) |
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: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4')
-rw-r--r-- | drivers/net/mlx4/en_netdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index 897f576b8b17..56627c26d918 100644 --- a/drivers/net/mlx4/en_netdev.c +++ b/drivers/net/mlx4/en_netdev.c | |||
@@ -801,7 +801,6 @@ static int mlx4_en_open(struct net_device *dev) | |||
801 | priv->rx_ring[i].packets = 0; | 801 | priv->rx_ring[i].packets = 0; |
802 | } | 802 | } |
803 | 803 | ||
804 | mlx4_en_set_default_moderation(priv); | ||
805 | err = mlx4_en_start_port(dev); | 804 | err = mlx4_en_start_port(dev); |
806 | if (err) | 805 | if (err) |
807 | en_err(priv, "Failed starting port:%d\n", priv->port); | 806 | 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 | en_dbg(DRV, priv, "Change MTU called with card down!?\n"); | 931 | en_dbg(DRV, priv, "Change MTU called with card down!?\n"); |
933 | } else { | 932 | } else { |
934 | mlx4_en_stop_port(dev); | 933 | mlx4_en_stop_port(dev); |
935 | mlx4_en_set_default_moderation(priv); | ||
936 | err = mlx4_en_start_port(dev); | 934 | err = mlx4_en_start_port(dev); |
937 | if (err) { | 935 | if (err) { |
938 | en_err(priv, "Failed restarting port:%d\n", | 936 | 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 | en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num); | 1078 | en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num); |
1081 | 1079 | ||
1082 | priv->registered = 1; | 1080 | priv->registered = 1; |
1081 | mlx4_en_set_default_moderation(priv); | ||
1083 | queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY); | 1082 | queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY); |
1084 | return 0; | 1083 | return 0; |
1085 | 1084 | ||