Skip to content

Commit 31fde03

Browse files
majdmellanoxdledford
authored andcommitted
IB/mlx5: Assign send CQ and recv CQ of UMR QP
The UMR's QP is created by calling mlx5_ib_create_qp directly, and therefore the send CQ and the recv CQ on the ibqp weren't assigned. Assign them right after calling the mlx5_ib_create_qp to assure that any access to those pointers will work as expected and won't crash the system as might happen as part of reset flow. Fixes: e126ba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Majd Dibbiny <[email protected]> Reviewed-by: Yishai Hadas <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 9950acf commit 31fde03

File tree

1 file changed

+2
-0
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+2
-0
lines changed

drivers/infiniband/hw/mlx5/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3138,6 +3138,8 @@ static int create_umr_res(struct mlx5_ib_dev *dev)
31383138
qp->real_qp = qp;
31393139
qp->uobject = NULL;
31403140
qp->qp_type = MLX5_IB_QPT_REG_UMR;
3141+
qp->send_cq = init_attr->send_cq;
3142+
qp->recv_cq = init_attr->recv_cq;
31413143

31423144
attr->qp_state = IB_QPS_INIT;
31433145
attr->port_num = 1;

0 commit comments

Comments
 (0)