From patchwork Fri Oct 12 10:57:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivasharan Srikanteshwara X-Patchwork-Id: 10638507 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 8DAC814E2 for ; Fri, 12 Oct 2018 10:58:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CC212B482 for ; Fri, 12 Oct 2018 10:58:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70E3F2B5BE; Fri, 12 Oct 2018 10:58:47 +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 26BC82B482 for ; Fri, 12 Oct 2018 10:58:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728297AbeJLSai (ORCPT ); Fri, 12 Oct 2018 14:30:38 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:40091 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727652AbeJLSah (ORCPT ); Fri, 12 Oct 2018 14:30:37 -0400 Received: by mail-ed1-f67.google.com with SMTP id r1-v6so11100731edd.7 for ; Fri, 12 Oct 2018 03:58:43 -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=w5UE3Vlu28hvKaM7vUESkySC+J5DYxSUUtB4jB5nPd0=; b=CCTsG1SyZLscWZfy3j7xt8qbmtqei8TvDTBseyMbU0xFioCVIPUdg3Wd7n5YO+B8mz Z5eOcXCVsPe4FxIuwSd8OywvJCNJ8mHlhRLsnbExNcyKQmoQFqN6KsvtHzat/gvrhrI0 KMp/qSZL8cTsXU28R1hi9n/5B9Lzg/YRRMmV0= 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=w5UE3Vlu28hvKaM7vUESkySC+J5DYxSUUtB4jB5nPd0=; b=GiM2Tkq4QwYTP+6JwUF7jkYQq05C2tU1yzWdVzV9nxDsqeY8dkX1EHnDJ14AHV/WxP bYuwZYIYlIrzI8EwKkmAMDSEircX+cksilNgYWYnr/5mnpnCqHraegozSKC0rB4abFLb aA7Na96XURIrzptMfaoj66xyN0rfp848ek/nmwaa7Qj/NtYymwUie1mfGtq8hSXeSMDt fJZ4tu2jnE27a6wZ8tOQ15FEi/rp3sT8cytwrx1mmRuFaFM5TaqbW0BgY9CHcVUHo6SH 6/5Q3kh+PLAv9zlgkofXNdJ+zQoTpv7UF2GtA0uM7UqBfNq78EBaLNBk3wlzLIOhDvyZ C1Mg== X-Gm-Message-State: ABuFfogq8z7hNl2hwkY21XUo6pLhuTe+BZnyAdVRVQdesppkwKZS86K9 a7I1o2zD7TiRihrUm4iZXnhsbXm4e0tO6Q== X-Google-Smtp-Source: ACcGV60Ygu66GGB5r2NUSjg7mR4BAtkCmyuzCRhVK/5OYVh6cFP2M9oRDZEYMgdSEziYyFwYQZXsgQ== X-Received: by 2002:a50:b3b7:: with SMTP id s52-v6mr8283545edd.251.1539341922789; Fri, 12 Oct 2018 03:58:42 -0700 (PDT) Received: from dhcp-135-24-192-142.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id m25-v6sm451198edc.86.2018.10.12.03.58.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 03:58:41 -0700 (PDT) From: Shivasharan S To: linux-scsi@vger.kernel.org Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, Shivasharan S Subject: [PATCH 14/19] megaraid_sas: Re-use max_mfi_cmds to calculate queue sizes Date: Fri, 12 Oct 2018 03:57:28 -0700 Message-Id: <1539341853-26814-15-git-send-email-shivasharan.srikanteshwara@broadcom.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1539341853-26814-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> References: <1539341853-26814-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 881bcfdcfa80..0a8b7167d05d 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;