From patchwork Fri Apr 26 09:37:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivasharan Srikanteshwara X-Patchwork-Id: 10918963 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 EE0721390 for ; Fri, 26 Apr 2019 09:39:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD30A28D55 for ; Fri, 26 Apr 2019 09:39:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D18ED28D69; Fri, 26 Apr 2019 09:39:27 +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 6F4F428D55 for ; Fri, 26 Apr 2019 09:39:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726173AbfDZJj1 (ORCPT ); Fri, 26 Apr 2019 05:39:27 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33454 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725944AbfDZJj1 (ORCPT ); Fri, 26 Apr 2019 05:39:27 -0400 Received: by mail-pg1-f194.google.com with SMTP id k19so1375285pgh.0 for ; Fri, 26 Apr 2019 02:39:26 -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=vdkio3QBlD5zsBnzYoszfBeSpqkcWZqqW1rk0pQR2sE=; b=SS6V2Cd6SNw/yORJkZ1Zknew5l2mHG0iH6FkosAYnLeJutBC+mwuW11SHcht9tX+M0 TFaDvfiZmMG8VYWqM5SREPii6LmRF4bJ2VVOaxbAKChfHsboW/9p4awa0MP1wGLNv1vO a8+m+8ZwhnCwwSd67vSb/QpJTQQmzAEvVaUwU= 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=vdkio3QBlD5zsBnzYoszfBeSpqkcWZqqW1rk0pQR2sE=; b=K5gePVoZR7Nqbvv2BiHrW9WZdNLErJVxk0eQHOnr4weNFpbvVhFMToiaHSVFKzEb1J GdmprOFeam9d8PVFxkrAdpwDguMYK9jCoQqRkaLvrO6YCESAiN+BzdFaH+PuiGnVnxDc P8M3dXqfoNY5dL39oJ3FswgeU1Y04mQe7ZiLQUXlF8Yd05B6IcJFlBzmLgmYCHh6w59w y2j2IOr4FibcL/01aeuqKfQoIPL9dxW2Y/ABy2X3ChydjBK3qGHKNAeoH2ZrF/5Bpk3U ortcNYDR/aAu7MG4tI46VVoZwwZWcQsHMqGQ1JTjlhWHd18Z8Tj4v0GrRDWGTOvj6QKM RKtA== X-Gm-Message-State: APjAAAXYomrQBDuIXJKLtqoYPbBRwR7cAyM1fNRip+CJ+E/ffj1JhVph HInYKNuWdIIov2EosX/0m3MqzmMHSmh7EAohC+qxnLr2/9AclVr3txFeStBVbnJdcA0e3SjLWp8 takilKz5xQ0lFaoycDAuKHCBee840j0jw3kVexBIPnZSjGXW4ZS9Hm+UDdZMhphBZIzWcJThA/b YbORyIpegqbGA53QumVygJ X-Google-Smtp-Source: APXvYqzhsi4gTMEEd5LrmYzoHJR4oN49izNLUHoacehfJ4iWh84xsHjvvNrow1Uw7BMTio65YiLtUQ== X-Received: by 2002:a63:e042:: with SMTP id n2mr42080351pgj.45.1556271565894; Fri, 26 Apr 2019 02:39:25 -0700 (PDT) Received: from dhcp-135-24-192-142.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id r4sm37994649pgl.69.2019.04.26.02.39.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Apr 2019 02:39:25 -0700 (PDT) From: Shivasharan S To: linux-scsi@vger.kernel.org Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, kiran-kumar.kasturi@broadcom.com, sankar.patra@broadcom.com, sasikumar.pc@broadcom.com, chandrakanth.patil@broadcom.com, Shivasharan S Subject: [PATCH 19/21] megaraid_sas: Fix MSI-x vector print Date: Fri, 26 Apr 2019 02:37:13 -0700 Message-Id: <1556271435-27252-20-git-send-email-shivasharan.srikanteshwara@broadcom.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1556271435-27252-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> References: <1556271435-27252-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 Print FW supported MSI-x vector count only if FW supports MSI-x. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 29fe77a8d2a6..18e157e3a99f 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -5681,7 +5681,7 @@ static int megasas_init_fw(struct megasas_instance *instance) void *base_addr_phys; struct megasas_ctrl_info *ctrl_info = NULL; unsigned long bar_list; - int i, j, loop, fw_msix_count = 0; + int i, j, loop; struct IOV_111 *iovPtr; struct fusion_context *fusion; @@ -5802,7 +5802,6 @@ static int megasas_init_fw(struct megasas_instance *instance) /* Thunderbolt Series*/ instance->msix_vectors = (scratch_pad_1 & MR_MAX_REPLY_QUEUES_OFFSET) + 1; - fw_msix_count = instance->msix_vectors; } else { instance->msix_vectors = ((scratch_pad_1 & MR_MAX_REPLY_QUEUES_EXT_OFFSET) @@ -5837,7 +5836,6 @@ static int megasas_init_fw(struct megasas_instance *instance) instance->smp_affinity_enable = false; } - fw_msix_count = instance->msix_vectors; /* Save 1-15 reply post index address to local memory * Index 0 is already saved from reg offset * MPI2_REPLY_POST_HOST_INDEX_OFFSET @@ -5850,6 +5848,10 @@ static int megasas_init_fw(struct megasas_instance *instance) + (loop * 0x10)); } } + + dev_info(&instance->pdev->dev, + "firmware supports msix\t: (%d)", + instance->msix_vectors); if (msix_vectors) instance->msix_vectors = min(msix_vectors, instance->msix_vectors); @@ -5892,8 +5894,6 @@ static int megasas_init_fw(struct megasas_instance *instance) megasas_setup_reply_map(instance); - dev_info(&instance->pdev->dev, - "firmware supports msix\t: (%d)", fw_msix_count); dev_info(&instance->pdev->dev, "current msix/online cpus\t: (%d/%d)\n", instance->msix_vectors, (unsigned int)num_online_cpus());