mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
net/mlx5e: Add error flow when failing update_rx
Up until now, return value of update_rx was ignored. Therefore, flow continues even if it fails. Add error flow in case of update_rx fails in mlx5e_open_locked, mlx5i_open and mlx5i_pkey_open. Signed-off-by: Guy Truzman <gtruzman@nvidia.com> Reviewed-by: Aya Levin <ayal@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
38438d39a9
commit
e74ae1faeb
@ -3069,7 +3069,10 @@ int mlx5e_open_locked(struct net_device *netdev)
|
||||
if (err)
|
||||
goto err_clear_state_opened_flag;
|
||||
|
||||
priv->profile->update_rx(priv);
|
||||
err = priv->profile->update_rx(priv);
|
||||
if (err)
|
||||
goto err_close_channels;
|
||||
|
||||
mlx5e_selq_apply(&priv->selq);
|
||||
mlx5e_activate_priv_channels(priv);
|
||||
mlx5e_apply_traps(priv, true);
|
||||
@ -3079,6 +3082,8 @@ int mlx5e_open_locked(struct net_device *netdev)
|
||||
mlx5e_queue_update_stats(priv);
|
||||
return 0;
|
||||
|
||||
err_close_channels:
|
||||
mlx5e_close_channels(&priv->channels);
|
||||
err_clear_state_opened_flag:
|
||||
clear_bit(MLX5E_STATE_OPENED, &priv->state);
|
||||
mlx5e_selq_cancel(&priv->selq);
|
||||
|
@ -561,12 +561,17 @@ static int mlx5i_open(struct net_device *netdev)
|
||||
if (err)
|
||||
goto err_remove_fs_underlay_qp;
|
||||
|
||||
epriv->profile->update_rx(epriv);
|
||||
err = epriv->profile->update_rx(epriv);
|
||||
if (err)
|
||||
goto err_close_channels;
|
||||
|
||||
mlx5e_activate_priv_channels(epriv);
|
||||
|
||||
mutex_unlock(&epriv->state_lock);
|
||||
return 0;
|
||||
|
||||
err_close_channels:
|
||||
mlx5e_close_channels(&epriv->channels);
|
||||
err_remove_fs_underlay_qp:
|
||||
mlx5_fs_remove_rx_underlay_qpn(mdev, ipriv->qpn);
|
||||
err_reset_qp:
|
||||
|
@ -221,12 +221,16 @@ static int mlx5i_pkey_open(struct net_device *netdev)
|
||||
mlx5_core_warn(mdev, "opening child channels failed, %d\n", err);
|
||||
goto err_clear_state_opened_flag;
|
||||
}
|
||||
epriv->profile->update_rx(epriv);
|
||||
err = epriv->profile->update_rx(epriv);
|
||||
if (err)
|
||||
goto err_close_channels;
|
||||
mlx5e_activate_priv_channels(epriv);
|
||||
mutex_unlock(&epriv->state_lock);
|
||||
|
||||
return 0;
|
||||
|
||||
err_close_channels:
|
||||
mlx5e_close_channels(&epriv->channels);
|
||||
err_clear_state_opened_flag:
|
||||
mlx5e_destroy_tis(mdev, epriv->tisn[0][0]);
|
||||
err_remove_rx_uderlay_qp:
|
||||
|
Loading…
Reference in New Issue
Block a user