Commit 31fde034 authored by Majd Dibbiny's avatar Majd Dibbiny Committed by Doug Ledford

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: e126ba97 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: default avatarMajd Dibbiny <majd@mellanox.com>
Reviewed-by: default avatarYishai Hadas <yishaih@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 9950acf9
...@@ -3138,6 +3138,8 @@ static int create_umr_res(struct mlx5_ib_dev *dev) ...@@ -3138,6 +3138,8 @@ static int create_umr_res(struct mlx5_ib_dev *dev)
qp->real_qp = qp; qp->real_qp = qp;
qp->uobject = NULL; qp->uobject = NULL;
qp->qp_type = MLX5_IB_QPT_REG_UMR; qp->qp_type = MLX5_IB_QPT_REG_UMR;
qp->send_cq = init_attr->send_cq;
qp->recv_cq = init_attr->recv_cq;
attr->qp_state = IB_QPS_INIT; attr->qp_state = IB_QPS_INIT;
attr->port_num = 1; attr->port_num = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment