From patchwork Mon Dec 20 14:11:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 12687991 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 E74DBC433F5 for ; Mon, 20 Dec 2021 14:05:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230064AbhLTOFB (ORCPT ); Mon, 20 Dec 2021 09:05:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230135AbhLTOE5 (ORCPT ); Mon, 20 Dec 2021 09:04:57 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6955C061574 for ; Mon, 20 Dec 2021 06:04:56 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id 2so2675176pgb.12 for ; Mon, 20 Dec 2021 06:04:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=9iGFNzA2FZQe1OeSzT3jmO7u9h1f/92QKWM7HqcKQ6o=; b=OC2eJI82LQpoUxuMPL9X97o/+7H3h+8+p1xOd+9Y9U2sMA/vvNG0DSdUvfqVE4aCC7 WTA6rPxlH9VaTapGLbAfnao3ESaCPDpl4cCjb3DZb4LrY8A0uQFPviIH18US3+SYAS5/ XXiqaBfJtdArYGd1WBU9V0r5s49iErkxSFmsc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=9iGFNzA2FZQe1OeSzT3jmO7u9h1f/92QKWM7HqcKQ6o=; b=dezuq/F+z3u3bE6Ef5h1KfAUIl41wlwaoFFdl9iLwVuktsxzS2gLQXW+qED91cDnaM +T9Gb6ddyhXcaobo4sN8SeVwoy4WAFcM2nb+SUHz5xvbpc0X1Pk+iK3Xxpamm7Ms8uzY 9X3hk1uzU4empEI4KHh950mPXsYLylr+IDePJmUGBxuP60DiniBq6LxkBs/8ixMgLqO0 4V7wttfBgDQKVIjaHBIAdQz7/c/XJsxxoQpbFUzaKwewKzuFHR+lSuPflCFQClog/B5m /3CyBKZB6aZ8ErbVwHjbY5KN6WMy3h/o5xglB4/9HvVTi6OvQEcPgecVHyhlZy8aD/vf +bjg== X-Gm-Message-State: AOAM533TqrYWgHuSsakw5GScp8+BXHKi0khrcICDAc87UdceEyJRoep7 dyInBObs8lVZc2KzUIjLabbhGKayA9FEcKqlmKX50wyaJMsNKIz2SVi6/IdMEMAXUQfs3N9PRlH aOvcgPAbu2EQ0t4oiSUgCixmjb4frYzaiL6GYid84D+jatRch+l5LEOmVwn8qaYxFI2L2WwqU+g PFYcIJJrDf X-Google-Smtp-Source: ABdhPJyILt0rvpYzizVrQ2Q/dgM7pbK2S+oSE1i8IZz+W1Bew8HYxX+KpahdOma3Jc2VtH4G9Wz9yg== X-Received: by 2002:a62:e904:0:b0:4a4:b4e3:a712 with SMTP id j4-20020a62e904000000b004a4b4e3a712mr16367889pfh.25.1640009095924; Mon, 20 Dec 2021 06:04:55 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id b4sm5434180pjm.17.2021.12.20.06.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Dec 2021 06:04:54 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 24/25] mpi3mr: Fixes around reply request queues Date: Mon, 20 Dec 2021 19:41:58 +0530 Message-Id: <20211220141159.16117-25-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211220141159.16117-1-sreekanth.reddy@broadcom.com> References: <20211220141159.16117-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org - Set reply queue depth of 1K for B0 and 4K to A0 - While freeing the segmented request queues use the actual segmented queue depth that is used while creating them. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr.h | 3 ++- drivers/scsi/mpi3mr/mpi3mr_fw.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h index 4ac1295..65ebb77 100644 --- a/drivers/scsi/mpi3mr/mpi3mr.h +++ b/drivers/scsi/mpi3mr/mpi3mr.h @@ -80,7 +80,8 @@ extern int prot_mask; /* Operational queue management definitions */ #define MPI3MR_OP_REQ_Q_QD 512 -#define MPI3MR_OP_REP_Q_QD 4096 +#define MPI3MR_OP_REP_Q_QD 1024 +#define MPI3MR_OP_REP_Q_QD4K 4096 #define MPI3MR_OP_REQ_Q_SEG_SIZE 4096 #define MPI3MR_OP_REP_Q_SEG_SIZE 4096 #define MPI3MR_MAX_SEG_LIST_SIZE 4096 diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index 82d9d6b..b55eadc 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -1523,7 +1523,7 @@ static void mpi3mr_free_op_req_q_segments(struct mpi3mr_ioc *mrioc, u16 q_idx) mrioc->op_reply_qinfo[q_idx].q_segment_list = NULL; } } else - size = mrioc->req_qinfo[q_idx].num_requests * + size = mrioc->req_qinfo[q_idx].segment_qd * mrioc->facts.op_req_sz; for (j = 0; j < mrioc->req_qinfo[q_idx].num_segments; j++) { @@ -1810,6 +1810,8 @@ static int mpi3mr_create_op_reply_q(struct mpi3mr_ioc *mrioc, u16 qidx) reply_qid = qidx + 1; op_reply_q->num_replies = MPI3MR_OP_REP_Q_QD; + if (!mrioc->pdev->revision) + op_reply_q->num_replies = MPI3MR_OP_REP_Q_QD4K; op_reply_q->ci = 0; op_reply_q->ephase = 1; atomic_set(&op_reply_q->pend_ios, 0);