mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-06-02 02:52:20 -04:00
RDMA/mlx5: Add support for 1600_8x lane speed
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>
This commit is contained in:
committed by
Leon Romanovsky
parent
0f1f9b5e47
commit
4022c7b634
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user