From: Mark Zhang <ma...@mellanox.com>

[ Upstream commit d246a3061528be6d852156d25c02ea69d6db7e65 ]

The commit citied in the Fixes line wasn't complete and solved
only part of the problems. Update the mlx5_ib to properly support
MLX5_CMD_OP_INIT2INIT_QP command in the DEVX, that is required when
modify the QP tx_port_affinity.

Fixes: 819f7427bafd ("RDMA/mlx5: Add init2init as a modify command")
Link: https://lore.kernel.org/r/20200527135703.482501-1-l...@kernel.org
Signed-off-by: Mark Zhang <ma...@mellanox.com>
Reviewed-by: Maor Gottlieb <ma...@mellanox.com>
Signed-off-by: Leon Romanovsky <leo...@mellanox.com>
Signed-off-by: Jason Gunthorpe <j...@mellanox.com>
Signed-off-by: Sasha Levin <sas...@kernel.org>
---
 drivers/infiniband/hw/mlx5/devx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/infiniband/hw/mlx5/devx.c 
b/drivers/infiniband/hw/mlx5/devx.c
index d0742823ab49..ed10e2f32aab 100644
--- a/drivers/infiniband/hw/mlx5/devx.c
+++ b/drivers/infiniband/hw/mlx5/devx.c
@@ -494,6 +494,10 @@ static u64 devx_get_obj_id(const void *in)
                obj_id = get_enc_obj_id(MLX5_CMD_OP_CREATE_QP,
                                        MLX5_GET(rst2init_qp_in, in, qpn));
                break;
+       case MLX5_CMD_OP_INIT2INIT_QP:
+               obj_id = get_enc_obj_id(MLX5_CMD_OP_CREATE_QP,
+                                       MLX5_GET(init2init_qp_in, in, qpn));
+               break;
        case MLX5_CMD_OP_INIT2RTR_QP:
                obj_id = get_enc_obj_id(MLX5_CMD_OP_CREATE_QP,
                                        MLX5_GET(init2rtr_qp_in, in, qpn));
-- 
2.25.1

Reply via email to