From patchwork Thu Jan 14 06:11:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 8029961 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 55AEE9FC69 for ; Thu, 14 Jan 2016 06:12:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B6E220445 for ; Thu, 14 Jan 2016 06:12:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7730520490 for ; Thu, 14 Jan 2016 06:12:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751121AbcANGMF (ORCPT ); Thu, 14 Jan 2016 01:12:05 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:36232 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750967AbcANGMD (ORCPT ); Thu, 14 Jan 2016 01:12:03 -0500 Received: by mail-wm0-f47.google.com with SMTP id l65so324205101wmf.1 for ; Wed, 13 Jan 2016 22:12:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leon-nu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=L4hYI28vakRsJwqE24uZ+XiQW6puj38UgGTAuOLA2PI=; b=N0khFn9y7wDAxNk/sw2NE4ehRYBlS3DEQjYZ3k41YUZ5YKqHz2EbY1PPVf4liDO9gE k7PQW6t7aM80ouPV41o+8+upTKBop/QNry0nkv6C2c3ScQM1EeXz7dt2TR3+TOLo4+E0 OkCuwd/tVtaMc8pJdG62c9++9XjxaWoX4LbNoEbIw56F1Lznld6ktbuano7pJz/Q/EaE anY4dUCSteSaysIuTZDHasIVKikzBDl9/ilhME7f0cUj36Vp4C6swfH1T+u1sP3mqj8t E2Q98bQrsPH8FC74mEsHiyTxFhH1jvZFaqQcMtaE5IK8AeSKVDp5ulgDy385qlDRXPV0 0MuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=L4hYI28vakRsJwqE24uZ+XiQW6puj38UgGTAuOLA2PI=; b=NQm+qlfxyQw+PaFvTzTnQHiPe6jo4uuHZTd9s1PSjid5dk3w4j1Er0lhRDpaHLuomS ta0QmlD3MjM8gdcpZxA4WUGHc5KobpqQtVqD7lrqHzvpFgsyGWBk0Or5+15AZg+EnZxc fzguZlv6nIJVi50jBtTI+FjUcklJeM4x1rQhfO01Fed/sdsAh8RselnSOnM1AveKZ/D+ gJWK7icpD/m83VH0wSr+PvDj4cYERE/vppThoC9GU5QvA+HkJp1SttesmgKu6m5nZXp6 Xa1t3A2uyHjmTdp9LnEUFZXjb6BCgH3jRtWICdnxM2k2VZqBj2H3hlA/c+Iz3cltWWc1 go+A== X-Gm-Message-State: ALoCoQmARdOfx8FHxrrljMn5FkyY0NmGYaS9KdGZYNZwZwmPr31ra+E4U8Hqi+CBoWq+T7nyc62/aH6cMczsfFMTDPaFGlP+8g== X-Received: by 10.28.4.139 with SMTP id 133mr28598804wme.21.1452751921354; Wed, 13 Jan 2016 22:12:01 -0800 (PST) Received: from localhost ([213.57.247.249]) by smtp.gmail.com with ESMTPSA id z127sm25321837wme.2.2016.01.13.22.12.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jan 2016 22:12:00 -0800 (PST) From: Leon Romanovsky To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, Leon Romanovsky , Subject: [PATCH] IB/mlx5: Expose correct maximum number of CQE capacity Date: Thu, 14 Jan 2016 08:11:40 +0200 Message-Id: <1452751900-23680-1-git-send-email-leon@leon.nu> X-Mailer: git-send-email 2.1.4 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Leon Romanovsky 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 Cc: Reviewed-by: Sagi Grimberg --- drivers/infiniband/hw/mlx5/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);