]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: Bug fixes in mlx4_ib_resize_cq
authorMajd Dibbiny <majd@mellanox.com>
Thu, 29 Jan 2015 08:41:42 +0000 (10:41 +0200)
committerRoland Dreier <roland@purestorage.com>
Wed, 18 Feb 2015 06:11:40 +0000 (22:11 -0800)
commit0ae0d6f7785eb9531f0a3c02fa7eefb21c42d95c
tree813287051366c3a6a34190d2bd2141b821075ff8
parent67074674e80f419f32c0c14e900f9d423763783d
IB/mlx4: Bug fixes in mlx4_ib_resize_cq

1. Before the entries alignment, we need to check that the entries
doesn't exceed the device's max cqe.

2. After the alignment, we need to make sure that the aligned number
doesn't exceed the max cqes+1. The additional cqe is used to denote
that the resizing operation has completed.

3. If the users asks to resize the CQ with entries less than the
oustanding cqes we should fail instead of returning 0.

Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx4/cq.c