diff options
author | Haggai Eran <haggaie@mellanox.com> | 2014-05-22 07:50:11 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-05-27 14:53:08 -0400 |
commit | 48fea837bb2709bda73cd4ae8bbd57cb277f7b90 (patch) | |
tree | acbdb3ee665f41b478eaae3f9431c7d4300b3254 | |
parent | b475598aec63f2efbc78f0ff1895d917d2370846 (diff) |
IB/mlx5: Set QP offsets and parameters for user QPs and not just for kernel QPs
For user QPs, the creation process does not currently initialize the fields:
* qp->rq.offset
* qp->sq.offset
* qp->sq.wqe_shift
Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r-- | drivers/infiniband/hw/mlx5/qp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index a89f70473fb7..d13ddf1c0033 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c | |||
@@ -574,6 +574,10 @@ static int create_user_qp(struct mlx5_ib_dev *dev, struct ib_pd *pd, | |||
574 | uar_index = uuarn_to_uar_index(&context->uuari, uuarn); | 574 | uar_index = uuarn_to_uar_index(&context->uuari, uuarn); |
575 | mlx5_ib_dbg(dev, "uuarn 0x%x, uar_index 0x%x\n", uuarn, uar_index); | 575 | mlx5_ib_dbg(dev, "uuarn 0x%x, uar_index 0x%x\n", uuarn, uar_index); |
576 | 576 | ||
577 | qp->rq.offset = 0; | ||
578 | qp->sq.wqe_shift = ilog2(MLX5_SEND_WQE_BB); | ||
579 | qp->sq.offset = qp->rq.wqe_cnt << qp->rq.wqe_shift; | ||
580 | |||
577 | err = set_user_buf_size(dev, qp, &ucmd); | 581 | err = set_user_buf_size(dev, qp, &ucmd); |
578 | if (err) | 582 | if (err) |
579 | goto err_uuar; | 583 | goto err_uuar; |