diff options
author | Tariq Toukan | 2018-11-26 16:22:16 +0100 |
---|---|---|
committer | Saeed Mahameed | 2019-02-19 23:15:03 +0100 |
commit | 877662e27276f345ea07e49f153aa88e9a1e313c (patch) | |
tree | d23bb543418a5f5bdce9ce105e98ef0a96e2c7b0 /drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | |
parent | net/mlx5: ethtool, Add ethtool support for 50Gbps per lane link modes (diff) | |
download | kernel-qcow2-linux-877662e27276f345ea07e49f153aa88e9a1e313c.tar.gz kernel-qcow2-linux-877662e27276f345ea07e49f153aa88e9a1e313c.tar.xz kernel-qcow2-linux-877662e27276f345ea07e49f153aa88e9a1e313c.zip |
net/mlx5e: Wrap the open and apply of channels in one fail-safe function
Take into a function the common code structure of opening
a side set of channels followed by a call to apply them.
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c index 722998d68564..554672edf8c3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c @@ -1126,9 +1126,7 @@ static void mlx5e_trust_update_sq_inline_mode(struct mlx5e_priv *priv) priv->channels.params.tx_min_inline_mode) goto out; - if (mlx5e_open_channels(priv, &new_channels)) - goto out; - mlx5e_switch_priv_channels(priv, &new_channels, NULL); + mlx5e_safe_switch_channels(priv, &new_channels, NULL); out: mutex_unlock(&priv->state_lock); |