Patch "net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-mlx5e-add-a-check-for-the-return-value-from-mlx5.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7a78420415b927f2a32864dee07eac2558a36ce4
Author: Shahar Shitrit <shshitrit@xxxxxxxxxx>
Date:   Tue Jul 30 09:16:37 2024 +0300

    net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys
    
    [ Upstream commit 3f8e82a020a5c22f9b791f4ac499b8e18007fbda ]
    
    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@xxxxxxxxxx>
    Reviewed-by: Carolina Jubran <cjubran@xxxxxxxxxx>
    Signed-off-by: Tariq Toukan <tariqt@xxxxxxxxxx>
    Reviewed-by: Wojciech Drewek <wojciech.drewek@xxxxxxxxx>
    Link: https://patch.msgid.link/20240730061638.1831002-9-tariqt@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 38263d5c98b34..50db127e6371b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -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:




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux