mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-12 20:35:23 +02:00
net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys
[ Upstream commit3f8e82a020
] Since the documentation for mlx5_toggle_port_link states that it should only be used after setting the port register, we add a check for the return value from mlx5_port_set_eth_ptys to ensure the register was successfully set before calling it. Fixes:667daedaec
("net/mlx5e: Toggle link only after modifying port parameters") Signed-off-by: Shahar Shitrit <shshitrit@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Link: https://patch.msgid.link/20240730061638.1831002-9-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
daab2cc17b
commit
82b9a3804a
|
@ -1223,7 +1223,12 @@ int mlx5e_ethtool_set_link_ksettings(struct mlx5e_priv *priv,
|
|||
if (!an_changes && link_modes == eproto.admin)
|
||||
goto out;
|
||||
|
||||
mlx5_port_set_eth_ptys(mdev, an_disable, link_modes, ext);
|
||||
err = mlx5_port_set_eth_ptys(mdev, an_disable, link_modes, ext);
|
||||
if (err) {
|
||||
netdev_err(priv->netdev, "%s: failed to set ptys reg: %d\n", __func__, err);
|
||||
goto out;
|
||||
}
|
||||
|
||||
mlx5_toggle_port_link(mdev);
|
||||
|
||||
out:
|
||||
|
|
Loading…
Reference in New Issue
Block a user