]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RDMA/mlx5: Add support for 1600_8x lane speed
authorMaher Sanalla <msanalla@nvidia.com>
Thu, 20 Nov 2025 15:15:16 +0000 (17:15 +0200)
committerLeon Romanovsky <leon@kernel.org>
Mon, 24 Nov 2025 07:58:30 +0000 (02:58 -0500)
Add a check for 1600G_8X link speed when querying PTYS and report it
back correctly when needed.

While at it, adjust mlx5 function which maps the speed rate from IB
spec values to internal driver values to be able to handle speeds
up to 1600Gbps.

Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Link: https://patch.msgid.link/20251120-speed-8-v1-2-e6a7efef8cb8@nvidia.com
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/qp.c

index 90daa58126f471d78949fe42581ec3364b34c4ff..40284bbb45d6dcc8ea7aefa429a8ebfefcad1ac7 100644 (file)
@@ -511,6 +511,10 @@ static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u16 *active_speed,
                *active_width = IB_WIDTH_4X;
                *active_speed = IB_SPEED_XDR;
                break;
+       case MLX5E_PROT_MASK(MLX5E_1600TAUI_8_1600TBASE_CR8_KR8):
+               *active_width = IB_WIDTH_8X;
+               *active_speed = IB_SPEED_XDR;
+               break;
        default:
                return -EINVAL;
        }
index 88724d15705d4bda4de1ef663514d570dc89a040..69af20790481a1af480ebcfcee7b0801f53287ae 100644 (file)
@@ -3451,10 +3451,11 @@ int mlx5r_ib_rate(struct mlx5_ib_dev *dev, u8 rate)
 {
        u32 stat_rate_support;
 
-       if (rate == IB_RATE_PORT_CURRENT || rate == IB_RATE_800_GBPS)
+       if (rate == IB_RATE_PORT_CURRENT || rate == IB_RATE_800_GBPS ||
+           rate == IB_RATE_1600_GBPS)
                return 0;
 
-       if (rate < IB_RATE_2_5_GBPS || rate > IB_RATE_800_GBPS)
+       if (rate < IB_RATE_2_5_GBPS || rate > IB_RATE_1600_GBPS)
                return -EINVAL;
 
        stat_rate_support = MLX5_CAP_GEN(dev->mdev, stat_rate_support);