Skip to content

Commit 306f354

Browse files
Leon RomanovskySaeed Mahameed
authored andcommitted
net/mlx5_core: Set IB capability mask1 to fix ib_srpt connection failure
The cap_mask1 isn't protected by field_select and not listed among RW fields, but it is required to be written to properly initialize ports in IB virtualization mode. Link: https://lore.kernel.org/linux-rdma/[email protected] Fixes: ab118da ("net/mlx5: Don't write read-only fields in MODIFY_HCA_VPORT_CONTEXT command") Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 81573b1 commit 306f354

File tree

1 file changed

+3
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+3
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/vport.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,9 @@ int mlx5_core_modify_hca_vport_context(struct mlx5_core_dev *dev,
10711071
MLX5_SET64(hca_vport_context, ctx, port_guid, req->port_guid);
10721072
if (req->field_select & MLX5_HCA_VPORT_SEL_NODE_GUID)
10731073
MLX5_SET64(hca_vport_context, ctx, node_guid, req->node_guid);
1074+
MLX5_SET(hca_vport_context, ctx, cap_mask1, req->cap_mask1);
1075+
MLX5_SET(hca_vport_context, ctx, cap_mask1_field_select,
1076+
req->cap_mask1_perm);
10741077
err = mlx5_cmd_exec(dev, in, in_sz, out, sizeof(out));
10751078
ex:
10761079
kfree(in);

0 commit comments

Comments
 (0)