aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/mr.c
diff options
context:
space:
mode:
authorEli Cohen <eli@dev.mellanox.co.il>2010-10-07 16:24:16 +0200
committerRoland Dreier <rolandd@cisco.com>2010-10-11 14:33:17 -0700
commit5a0fd09428e47fb08d5a887515d92bb2447f4b65 (patch)
tree83a6642cb0dfd99dff733dde7b4c7aa40df2d920 /drivers/infiniband/hw/mlx4/mr.c
parentmlx4_core: Allow log_mtts_per_seg up to 7 (diff)
downloadlinux-dev-5a0fd09428e47fb08d5a887515d92bb2447f4b65.tar.xz
linux-dev-5a0fd09428e47fb08d5a887515d92bb2447f4b65.zip
IB/mlx4: Limit size of fast registration WRs
Fix the limit on the size of max fast registration WRs that can be posted to match hardware capabilities. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/mr.c')
-rw-r--r--drivers/infiniband/hw/mlx4/mr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/mr.c b/drivers/infiniband/hw/mlx4/mr.c
index 1d27b9a8e2d6..dca55b19a6f1 100644
--- a/drivers/infiniband/hw/mlx4/mr.c
+++ b/drivers/infiniband/hw/mlx4/mr.c
@@ -226,7 +226,7 @@ struct ib_fast_reg_page_list *mlx4_ib_alloc_fast_reg_page_list(struct ib_device
struct mlx4_ib_fast_reg_page_list *mfrpl;
int size = page_list_len * sizeof (u64);
- if (size > PAGE_SIZE)
+ if (page_list_len > MLX4_MAX_FAST_REG_PAGES)
return ERR_PTR(-EINVAL);
mfrpl = kmalloc(sizeof *mfrpl, GFP_KERNEL);