OSDN Git Service

IB/mlx5: Fix entries check in mlx5_ib_resize_cq
authorNoa Osherovich <noaos@mellanox.com>
Sat, 4 Jun 2016 12:15:35 +0000 (15:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Aug 2016 16:09:25 +0000 (18:09 +0200)
commita25be0f972d74aa4bd3efe8951eb3c66d605c650
tree0068106bb1d5e7b3bd9264db7fc5050a1cd348c7
parentcbbfde038e42029e4dfbb303ab5f825fd743973e
IB/mlx5: Fix entries check in mlx5_ib_resize_cq

commit 3c4c37746c919c983e439ac6a7328cd2d48c10ed upstream.

Verify that number of entries is less than device capability.
Add an appropriate warning message for error flow.

Fixes: bde51583f49b ('IB/mlx5: Add support for resize CQ')
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/cq.c