diff options
author | Eli Cohen <eli@dev.mellanox.co.il> | 2013-10-24 13:01:03 +0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-11-09 02:43:01 +0400 |
commit | 1b77d2bd753d119eedcbc08fda58934307676554 (patch) | |
tree | 7f2e6dfe67f82b37c17e83a73dd5f00751a47505 /drivers/infiniband/hw/mlx5/srq.c | |
parent | c2a3431e6153ed90911704356bc1e869624e118d (diff) | |
download | linux-1b77d2bd753d119eedcbc08fda58934307676554.tar.xz |
mlx5: Use enum to indicate adapter page size
The Connect-IB adapter has an inherent page size which equals 4K.
Define an new enum that equals the page shift and use it instead of
using the value 12 throughout the code.
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/srq.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/srq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx5/srq.c b/drivers/infiniband/hw/mlx5/srq.c index dbc2c7188c5e..210b3eaf188a 100644 --- a/drivers/infiniband/hw/mlx5/srq.c +++ b/drivers/infiniband/hw/mlx5/srq.c @@ -123,7 +123,7 @@ static int create_srq_user(struct ib_pd *pd, struct mlx5_ib_srq *srq, goto err_in; } - (*in)->ctx.log_pg_sz = page_shift - 12; + (*in)->ctx.log_pg_sz = page_shift - MLX5_ADAPTER_PAGE_SHIFT; (*in)->ctx.pgoff_cqn = cpu_to_be32(offset << 26); return 0; @@ -192,7 +192,7 @@ static int create_srq_kernel(struct mlx5_ib_dev *dev, struct mlx5_ib_srq *srq, } srq->wq_sig = !!srq_signature; - (*in)->ctx.log_pg_sz = page_shift - 12; + (*in)->ctx.log_pg_sz = page_shift - MLX5_ADAPTER_PAGE_SHIFT; return 0; |