summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
diff options
context:
space:
mode:
authorSaeed Mahameed <saeedm@mellanox.com>2017-02-13 01:19:14 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2017-03-27 15:08:24 +0300
commit2e20a151205be8e7efa9644cdb942381e7bec787 (patch)
tree918c67edbddce561eee16a11bbedb5eedc46367a /drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
parent6f9485af4020a858ac91adc5286411b6dd3c2f06 (diff)
downloadop-kernel-dev-2e20a151205be8e7efa9644cdb942381e7bec787.zip
op-kernel-dev-2e20a151205be8e7efa9644cdb942381e7bec787.tar.gz
net/mlx5e: Fail safe mtu and lro setting
Use the new fail-safe channels switch mechanism to set new netdev mtu and lro settings. MTU and lro settings demand some HW configuration changes after new channels are created and ready for action. In order to unify switch channels routine for LRO and MTU changes, and maybe future configuration features, we now pass to it a modify HW function pointer to be invoked directly after old channels are de-activated and before new channels are activated. Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index c5f49e2..4091293 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -540,7 +540,7 @@ static int mlx5e_set_ringparam(struct net_device *dev,
if (err)
goto unlock;
- mlx5e_switch_priv_channels(priv, &new_channels);
+ mlx5e_switch_priv_channels(priv, &new_channels, NULL);
unlock:
mutex_unlock(&priv->state_lock);
@@ -597,7 +597,7 @@ static int mlx5e_set_channels(struct net_device *dev,
mlx5e_arfs_disable(priv);
/* Switch to new channels, set new parameters and close old ones */
- mlx5e_switch_priv_channels(priv, &new_channels);
+ mlx5e_switch_priv_channels(priv, &new_channels, NULL);
if (arfs_enabled) {
err = mlx5e_arfs_enable(priv);
@@ -691,7 +691,7 @@ static int mlx5e_set_coalesce(struct net_device *netdev,
if (err)
goto out;
- mlx5e_switch_priv_channels(priv, &new_channels);
+ mlx5e_switch_priv_channels(priv, &new_channels, NULL);
out:
mutex_unlock(&priv->state_lock);
@@ -1166,7 +1166,7 @@ static int mlx5e_set_tunable(struct net_device *dev,
err = mlx5e_open_channels(priv, &new_channels);
if (err)
break;
- mlx5e_switch_priv_channels(priv, &new_channels);
+ mlx5e_switch_priv_channels(priv, &new_channels, NULL);
break;
default:
@@ -1503,7 +1503,7 @@ static int set_pflag_rx_cqe_based_moder(struct net_device *netdev, bool enable)
if (err)
return err;
- mlx5e_switch_priv_channels(priv, &new_channels);
+ mlx5e_switch_priv_channels(priv, &new_channels, NULL);
return 0;
}
@@ -1534,7 +1534,7 @@ int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool new_val
if (err)
return err;
- mlx5e_switch_priv_channels(priv, &new_channels);
+ mlx5e_switch_priv_channels(priv, &new_channels, NULL);
return 0;
}
OpenPOWER on IntegriCloud