]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4: Enforce device max FMR maps in FMR alloc
authorEli Cohen <eli@dev.mellanox.co.il>
Thu, 9 Feb 2012 16:10:06 +0000 (18:10 +0200)
committerRoland Dreier <roland@purestorage.com>
Sun, 26 Feb 2012 09:43:37 +0000 (01:43 -0800)
commit940b6e134555d30e9c9073a52ac6b620f6e5dc5e
tree2642ee58996918ae4a09be9d82d97a6516eb215b
parent91ea085c80f88a36831450a6451d14bab0bd749d
mlx4: Enforce device max FMR maps in FMR alloc

ConnectX devices have a limit on the number of mappings that can be
done on an FMR before having to call sync_tpt.  The current
mlx4_ib driver reports the limit correctly in max_map_per_fmr in
.query_device(), but mlx4_core doesn't check it when actually
allocating FMRs.

Add a max_fmr_maps field to struct mlx4_caps and enforce this maximum
value on FMR allocations.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/mr.c
include/linux/mlx4/device.h