From patchwork Wed Oct 17 06:37:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivasharan Srikanteshwara X-Patchwork-Id: 10644665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AED491508 for ; Wed, 17 Oct 2018 06:38:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A02902A76E for ; Wed, 17 Oct 2018 06:38:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9443D2A790; Wed, 17 Oct 2018 06:38:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D6962A76E for ; Wed, 17 Oct 2018 06:38:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727351AbeJQOc5 (ORCPT ); Wed, 17 Oct 2018 10:32:57 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:46669 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727099AbeJQOc5 (ORCPT ); Wed, 17 Oct 2018 10:32:57 -0400 Received: by mail-pl1-f193.google.com with SMTP id v5-v6so12175615plz.13 for ; Tue, 16 Oct 2018 23:38:49 -0700 (PDT) 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; bh=Hilu2QAcq+g0r0pL02pUmLtWBRHmZW4jq40BS6ZVrro=; b=GacnViW1obQgYX9l/Rf/DK1rBSUgqCED9pS16zyf7/h48M+FdFw0AEa0CUA5YESJQd 2ldCnaide8niAtqZzLldXIdak+IQNebAH2vI3ExLFm4qzxTEonlKYejMpDzsfY+m6i4o ZBUU+wi2cBJUozjhleox0V330lyIpt1m4plqI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Hilu2QAcq+g0r0pL02pUmLtWBRHmZW4jq40BS6ZVrro=; b=SLt7K+238IhbqzGz9W/5ZGRLBCQe7j2tn2J8H6HJQV3y/8STRY9GhszhHDp6SjLDTR WGrR/aaFQZomYAmOjbg/Ew3s5INgrNoBu3jSuObwMLh1AzatEWMOznCGV/xdcBG5M4kk ppZl5nqLEqrDBpZWyOG/oK2oxeF822oBIhBW1u54WkLwt/v2BTb2uLotOpHqf6ctDIRo udAqCmNwN2awxc/gpcfugSYn23iE6M+/97YMd6D06/OgSh3CDv36aK3dmddr23nU1hu6 2VbBkTr/gJ6eeOvSb8XEVUQOrw0UI79WkRiS++eYxbnn3AV1fUFSRwd9WY1iuifRZCiR q0qw== X-Gm-Message-State: ABuFfoiviId2W/1kMwyFfcCPmmyqSMu/Q1hiHDjt9sKXrJ7T6x6tEJ4K i/kLqA4F0bJ1my9G5I3y9KW6UJdZAIOvhA== X-Google-Smtp-Source: ACcGV600ssQJrj/H0ODZMCReqs7B/LxPSk+hH56+t4X2FH8TF0Qbaln2kBP22J5MW+r33/UQLzWqDg== X-Received: by 2002:a17:902:6948:: with SMTP id k8-v6mr24881150plt.75.1539758328708; Tue, 16 Oct 2018 23:38:48 -0700 (PDT) Received: from dhcp-135-24-192-142.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id y131-v6sm19375425pfg.164.2018.10.16.23.38.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 23:38:47 -0700 (PDT) From: Shivasharan S To: linux-scsi@vger.kernel.org Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, Shivasharan S Subject: [PATCH V2 14/19] megaraid_sas: Re-use max_mfi_cmds to calculate queue sizes Date: Tue, 16 Oct 2018 23:37:52 -0700 Message-Id: <1539758277-1882-15-git-send-email-shivasharan.srikanteshwara@broadcom.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1539758277-1882-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> References: <1539758277-1882-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In megasas_init_adapter_fusion(), max_mfi_cmds is being calcuated as (MEGASAS_FUSION_INTERNAL_CMDS + MEGASAS_FUSION_IOCTL_CMDS). max_mfi_cmds can be used in megasas_configure_queue_sizes. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index b44a5fef5d9b..b13fd1c601d7 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -1564,9 +1564,7 @@ void megasas_configure_queue_sizes(struct megasas_instance *instance) else instance->max_mpt_cmds = instance->max_fw_cmds; - instance->max_scsi_cmds = instance->max_fw_cmds - - (MEGASAS_FUSION_INTERNAL_CMDS + - MEGASAS_FUSION_IOCTL_CMDS); + instance->max_scsi_cmds = instance->max_fw_cmds - instance->max_mfi_cmds; instance->cur_can_queue = instance->max_scsi_cmds; instance->host->can_queue = instance->cur_can_queue;