IB/mlx5: Fix page shift in create CQ for userspace
authorEli Cohen <eli@dev.mellanox.co.il>
Thu, 31 Oct 2013 13:26:36 +0000 (15:26 +0200)
committerRoland Dreier <roland@purestorage.com>
Fri, 15 Nov 2013 22:36:36 +0000 (14:36 -0800)
When creating a CQ, we must use mlx5 adapter page shift.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx5/cq.c

index 28344773f6409858dcd0c0c3bc0889b8afcf9d8b..b726274297458e2de91b2c324881f2f83dababf6 100644 (file)
@@ -556,7 +556,7 @@ static int create_cq_user(struct mlx5_ib_dev *dev, struct ib_udata *udata,
                goto err_db;
        }
        mlx5_ib_populate_pas(dev, cq->buf.umem, page_shift, (*cqb)->pas, 0);
-       (*cqb)->ctx.log_pg_sz = page_shift - PAGE_SHIFT;
+       (*cqb)->ctx.log_pg_sz = page_shift - MLX5_ADAPTER_PAGE_SHIFT;
 
        *index = to_mucontext(context)->uuari.uars[0].index;