RDMA/mlx5: mlx5_umem_find_best_quantized_pgoff() for CQ
authorJason Gunthorpe <jgg@nvidia.com>
Sun, 15 Nov 2020 11:43:09 +0000 (13:43 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 16 Nov 2020 20:53:30 +0000 (16:53 -0400)
commitc08fbdc57741026a440d01593e09e11b60b3e210
treeccf7b749a9874e431e10c3429f60a2003b0f1a9e
parenta59b7b05efc827929c2aa46fc2fe561982bd19fc
RDMA/mlx5: mlx5_umem_find_best_quantized_pgoff() for CQ

This fixes a bug where the page_offset was not being considered when
building a CQ. The HW specification says it 'must be zero', so use
a variant of mlx5_umem_find_best_quantized_pgoff() with a 0 pgoff_bitmask
to force this result.

Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Link: https://lore.kernel.org/r/20201115114311.136250-6-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/cq.c
drivers/infiniband/hw/mlx5/mlx5_ib.h