diff mbox

IB/mlx5: Expose correct maximum number of CQE capacity

Message ID 1452751900-23680-1-git-send-email-leon@leon.nu (mailing list archive)
State Accepted
Headers show

Commit Message

Leon Romanovsky Jan. 14, 2016, 6:11 a.m. UTC
From: Leon Romanovsky <leonro@mellanox.com>

Maximum number of EQE capacity per CQ was mistakenly exposed
as CQE. Fix that.

Fixes: 938fe83c8dcb ("net/mlx5_core: New device capabilities handling")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Cc: <stable@vger.kernel.org>
---
 drivers/infiniband/hw/mlx5/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sagi Grimberg Jan. 14, 2016, 11:06 a.m. UTC | #1
> From: Leon Romanovsky <leonro@mellanox.com>
>
> Maximum number of EQE capacity per CQ was mistakenly exposed
> as CQE. Fix that.
>

Looks good,

Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Doug Ledford Jan. 19, 2016, 8:54 p.m. UTC | #2
On 01/14/2016 06:06 AM, Sagi Grimberg wrote:
> 
>> From: Leon Romanovsky <leonro@mellanox.com>
>>
>> Maximum number of EQE capacity per CQ was mistakenly exposed
>> as CQE. Fix that.
>>
> 
> Looks good,
> 
> Reviewed-by: Sagi Grimberg <sagig@mellanox.com>

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 5e3d3aea35bc..155dbe3826f8 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -515,7 +515,7 @@  static int mlx5_ib_query_device(struct ib_device *ibdev,
 	props->max_sge = min(max_rq_sg, max_sq_sg);
 	props->max_sge_rd = props->max_sge;
 	props->max_cq		   = 1 << MLX5_CAP_GEN(mdev, log_max_cq);
-	props->max_cqe = (1 << MLX5_CAP_GEN(mdev, log_max_eq_sz)) - 1;
+	props->max_cqe = (1 << MLX5_CAP_GEN(mdev, log_max_cq_sz)) - 1;
 	props->max_mr		   = 1 << MLX5_CAP_GEN(mdev, log_max_mkey);
 	props->max_pd		   = 1 << MLX5_CAP_GEN(mdev, log_max_pd);
 	props->max_qp_rd_atom	   = 1 << MLX5_CAP_GEN(mdev, log_max_ra_req_qp);