]> git.dujemihanovic.xyz Git - linux.git/commit
net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys
authorShahar Shitrit <shshitrit@nvidia.com>
Tue, 30 Jul 2024 06:16:37 +0000 (09:16 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 1 Aug 2024 01:04:51 +0000 (18:04 -0700)
commit3f8e82a020a5c22f9b791f4ac499b8e18007fbda
treee55f67ba4f7698e9ca4eeecb36d7a4084d54a32e
parent025f2b85a5e5a46df14ecf162c3c80a957a36d0b
net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys

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: 667daedaecd1 ("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>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c