From patchwork Fri Jun 9 11:01:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13273719 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B6FDC7EE25 for ; Fri, 9 Jun 2023 11:14:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239428AbjFILOc (ORCPT ); Fri, 9 Jun 2023 07:14:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238846AbjFILO1 (ORCPT ); Fri, 9 Jun 2023 07:14:27 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4429630C1 for ; Fri, 9 Jun 2023 04:14:24 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-65292f79456so1259918b3a.2 for ; Fri, 09 Jun 2023 04:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1686309263; x=1688901263; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=D/XK+e8xEZ2UscGZFQz8Vqmt84+jVCmoEiIa15dSAtw=; b=ggZvu7sXttNbmuBR0dTFoRL9bXs3wFdcf0K/vIn1FEP7/AvQwjmcmNt64WZX4cI0M/ tKOxV+WCkM+K6TqRJtln91BqOC879zOKhdVQZ0vzvVj6XTQUmiocgB7NFuxIFP19EUWF ZrG/DpMf4D/D12G97wHK0eL1xoILo//2ND3qw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686309263; x=1688901263; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=D/XK+e8xEZ2UscGZFQz8Vqmt84+jVCmoEiIa15dSAtw=; b=AR6dIbgJ9h2ahU/3Fi4eqCFJvOMW8W1Wpip+2NhvN4ojbLJxK7Wz6wnkisNvtVmofP LjXml0M6lLZgLIPhHEb//WsKwxzvj7IlMOASJVKA73xc+8GpEPop35IJ6IJX/fcJkHFL Kr1CnNS/Fa7iHKKLd1ptD5WgNIEjIbjYiBfQbNqPDTWpwT4gKk+2nY3GBsd6AMm3IAn7 jNkrBFoH/fVIBAxMj2dGftThiWawmiBFgoRJGW7ClFZNtSbevCStlAbg5O4WcCgVh2at 4ZWQ69vUJ81V5SUXLIobHhCm+lqgCcK2478ABkKn/DeOpSUpCxcH+Tz3Ad+rmJCGPjYp KZ7w== X-Gm-Message-State: AC+VfDyQuOMqcmVKCAKAQ4QBe1whiIGW5B5q4nMS7W0r+kioUz38qh4m 572Pnn402L2sz2MYLHLCWbSD++VNFpDjlB87mmY= X-Google-Smtp-Source: ACHHUZ7bvmeGCUfJHnF1woC41ygt8oKfip8/4jJPLf5c8pX0fMbgxcoatK6Mfs2YuBCm9K0p7qZzwQ== X-Received: by 2002:a17:903:2446:b0:1ad:fa2e:17f8 with SMTP id l6-20020a170903244600b001adfa2e17f8mr746690pls.12.1686309263576; Fri, 09 Jun 2023 04:14:23 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id q4-20020a170902dac400b001b0142908f7sm2992954plx.291.2023.06.09.04.14.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Jun 2023 04:14:22 -0700 (PDT) From: Selvin Xavier To: jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, kashyap.desai@broadcom.com, Selvin Xavier Subject: [PATCH v2 for-next 04/17] RDMA/bnxt_re: set fixed command queue depth Date: Fri, 9 Jun 2023 04:01:41 -0700 Message-Id: <1686308514-11996-5-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1686308514-11996-1-git-send-email-selvin.xavier@broadcom.com> References: <1686308514-11996-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Kashyap Desai There is no need of setting max command queue entries based on firmware version check. Removing deperecated code. Signed-off-by: Kashyap Desai Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 6 ++---- drivers/infiniband/hw/bnxt_re/qplib_rcfw.h | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c index 67140eb..66121fb 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c @@ -600,10 +600,8 @@ int bnxt_qplib_alloc_rcfw_channel(struct bnxt_qplib_res *res, "HW channel CREQ allocation failed\n"); goto fail; } - if (ctx->hwrm_intf_ver < HWRM_VERSION_RCFW_CMDQ_DEPTH_CHECK) - rcfw->cmdq_depth = BNXT_QPLIB_CMDQE_MAX_CNT_256; - else - rcfw->cmdq_depth = BNXT_QPLIB_CMDQE_MAX_CNT_8192; + + rcfw->cmdq_depth = BNXT_QPLIB_CMDQE_MAX_CNT; sginfo.pgsize = bnxt_qplib_cmdqe_page_size(rcfw->cmdq_depth); hwq_attr.depth = rcfw->cmdq_depth & 0x7FFFFFFF; diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.h b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.h index 0dff56e..32e5b67 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.h +++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.h @@ -69,8 +69,7 @@ static inline void bnxt_qplib_rcfw_cmd_prep(struct cmdq_base *req, #define RCFW_CMD_WAIT_TIME_MS 20000 /* 20 Seconds timeout */ /* CMDQ elements */ -#define BNXT_QPLIB_CMDQE_MAX_CNT_256 256 -#define BNXT_QPLIB_CMDQE_MAX_CNT_8192 8192 +#define BNXT_QPLIB_CMDQE_MAX_CNT 8192 #define BNXT_QPLIB_CMDQE_BYTES(depth) ((depth) * BNXT_QPLIB_CMDQE_UNITS) static inline u32 bnxt_qplib_cmdqe_npages(u32 depth) @@ -105,12 +104,10 @@ static inline u32 bnxt_qplib_set_cmd_slots(struct cmdq_base *req) return cmd_byte; } -#define RCFW_MAX_COOKIE_VALUE 0x7FFF +#define RCFW_MAX_COOKIE_VALUE (BNXT_QPLIB_CMDQE_MAX_CNT - 1) #define RCFW_CMD_IS_BLOCKING 0x8000 #define RCFW_BLOCKED_CMD_WAIT_COUNT 20000000UL /* 20 sec */ -#define HWRM_VERSION_RCFW_CMDQ_DEPTH_CHECK 0x1000900020011ULL - /* Crsq buf is 1024-Byte */ struct bnxt_qplib_crsbe { u8 data[1024];