aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/ipoib
diff options
context:
space:
mode:
authorTariq Toukan <tariqt@mellanox.com>2018-11-26 17:22:16 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2019-02-19 14:15:03 -0800
commit877662e27276f345ea07e49f153aa88e9a1e313c (patch)
treed23bb543418a5f5bdce9ce105e98ef0a96e2c7b0 /drivers/net/ethernet/mellanox/mlx5/core/ipoib
parentnet/mlx5: ethtool, Add ethtool support for 50Gbps per lane link modes (diff)
downloadlinux-dev-877662e27276f345ea07e49f153aa88e9a1e313c.tar.xz
linux-dev-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/ipoib')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
index bfc0f6581729..4eac42555c7d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
@@ -446,11 +446,11 @@ static int mlx5i_change_mtu(struct net_device *netdev, int new_mtu)
new_channels.params = *params;
new_channels.params.sw_mtu = new_mtu;
- err = mlx5e_open_channels(priv, &new_channels);
+
+ err = mlx5e_safe_switch_channels(priv, &new_channels, NULL);
if (err)
goto out;
- mlx5e_switch_priv_channels(priv, &new_channels, NULL);
netdev->mtu = new_channels.params.sw_mtu;
out: