Skip to content

Commit 530c863

Browse files
ayalevin123jgunthorpe
authored andcommitted
IB/mlx5: Fix 50G per lane indication
Some released FW versions mistakenly don't set the capability that 50G per lane link-modes are supported for VFs (ptys_extended_ethernet capability bit). Use PTYS.ext_eth_proto_capability instead, as this indication is always accurate. If PTYS.ext_eth_proto_capability is valid (has a non-zero value) conclude that the HCA supports 50G per lane. Otherwise, conclude that the HCA doesn't support 50G per lane. Fixes: 08e8676 ("IB/mlx5: Add support for 50Gbps per lane link modes") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Aya Levin <[email protected]> Reviewed-by: Eran Ben Elisha <[email protected]> Reviewed-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 0434064 commit 530c863

File tree

1 file changed

+1
-1
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/mlx5/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num,
511511
mdev_port_num);
512512
if (err)
513513
goto out;
514-
ext = MLX5_CAP_PCAM_FEATURE(dev->mdev, ptys_extended_ethernet);
514+
ext = !!MLX5_GET_ETH_PROTO(ptys_reg, out, true, eth_proto_capability);
515515
eth_prot_oper = MLX5_GET_ETH_PROTO(ptys_reg, out, ext, eth_proto_oper);
516516

517517
props->active_width = IB_WIDTH_4X;

0 commit comments

Comments
 (0)