diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-07-21 13:40:12 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-08-29 04:54:46 +0200 |
commit | e0238a6a369eaa2e41b2c0321453272fb859f618 (patch) | |
tree | 1ec30e680902668c46641b3e3bcc6166eb3c1095 /drivers/infiniband/hw | |
parent | mlx5: Fix missing device local_dma_lkey (diff) | |
download | linux-e0238a6a369eaa2e41b2c0321453272fb859f618.tar.xz linux-e0238a6a369eaa2e41b2c0321453272fb859f618.zip |
mlx5: Expose correct page_size_cap in device attributes
Should be all the page sizes that are supported by the
device.
Reported-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 5ab5bb3feb97..1ece3a7debd5 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -212,6 +212,7 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, int err = -ENOMEM; int max_rq_sg; int max_sq_sg; + u64 min_page_size = 1ull << MLX5_CAP_GEN(mdev, log_pg_sz); if (uhw->inlen || uhw->outlen) return -EINVAL; @@ -264,7 +265,7 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, props->hw_ver = mdev->pdev->revision; props->max_mr_size = ~0ull; - props->page_size_cap = 1ull << MLX5_CAP_GEN(mdev, log_pg_sz); + props->page_size_cap = ~(min_page_size - 1); props->max_qp = 1 << MLX5_CAP_GEN(mdev, log_max_qp); props->max_qp_wr = 1 << MLX5_CAP_GEN(mdev, log_max_qp_sz); max_rq_sg = MLX5_CAP_GEN(mdev, max_wqe_sz_rq) / |