Patch "RDMA/mlx5: Fix port number for counter query in multi-port configuration" 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

    RDMA/mlx5: Fix port number for counter query in multi-port configuration

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:
     rdma-mlx5-fix-port-number-for-counter-query-in-multi.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 04fbbb180d28ada935412f7f25dcf705b04592b8
Author: Michael Guralnik <michaelgur@xxxxxxxxxx>
Date:   Wed Apr 3 12:03:46 2024 +0300

    RDMA/mlx5: Fix port number for counter query in multi-port configuration
    
    [ Upstream commit be121ffb384f53e966ee7299ffccc6eeb61bc73d ]
    
    Set the correct port when querying PPCNT in multi-port configuration.
    Distinguish between cases where switchdev mode was enabled to multi-port
    configuration and don't overwrite the queried port to 1 in multi-port
    case.
    
    Fixes: 74b30b3ad5ce ("RDMA/mlx5: Set local port to one when accessing counters")
    Signed-off-by: Michael Guralnik <michaelgur@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/9bfcc8ade958b760a51408c3ad654a01b11f7d76.1712134988.git.leon@xxxxxxxxxx
    Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c
index 8102ef113b7e0..64dae68c43e62 100644
--- a/drivers/infiniband/hw/mlx5/mad.c
+++ b/drivers/infiniband/hw/mlx5/mad.c
@@ -188,7 +188,8 @@ static int process_pma_cmd(struct mlx5_ib_dev *dev, u32 port_num,
 		mdev = dev->mdev;
 		mdev_port_num = 1;
 	}
-	if (MLX5_CAP_GEN(dev->mdev, num_ports) == 1) {
+	if (MLX5_CAP_GEN(dev->mdev, num_ports) == 1 &&
+	    !mlx5_core_mp_enabled(mdev)) {
 		/* set local port to one for Function-Per-Port HCA. */
 		mdev = dev->mdev;
 		mdev_port_num = 1;




[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