mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
To: JBottomley@Parallels.com, jejb@kernel.org, hch@infradead.org
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	Sathya.Prakash@broadcom.com, kashyap.desai@broadcom.com,
	krishnaraddi.mankani@broadcom.com, linux-kernel@vger.kernel.org,
	suganath-prabu.subramani@broadcom.com,
	chaitra.basappa@broadcom.com, sreekanth.reddy@broadcom.com,
	Sathya Prakash <sathya.prakash@broadcom.com>
Subject: [PATCH 02/10] mpt3sas: Fix for incorrect numbers for MSIX vectors  enabled when  non RDPQ card is enumerated first.
Date: Thu, 20 Oct 2016 17:50:10 +0530	[thread overview]
Message-ID: <1476966018-10457-3-git-send-email-suganath-prabu.subramani@broadcom.com> (raw)
In-Reply-To: <1476966018-10457-1-git-send-email-suganath-prabu.subramani@broadcom.com>

No. of MSIX vectors supported = min (Total no. of CPU cores,
MSIX vectors supported by card)

when RDPQ is disabled "max_msix_vectors" module parameter which was
declared as global was set to '8' and hence if there are more than one card
in system among which if RDPQ disabled card is enumerated first then only 8
MSIX vectors was getting enabled for all the cards(including RDPQ enabled
card,which can support more than 8 MSIX vectors).

Used local variable instead of global variable ,if RDPQ is disabled this
local variable is set to '8' else it is set to "max_msix_vectors" (by
default this is set to -1, whose value can be set by user during driver
load time).So now regardless of whether RDPQ disabled card is enumerated
first or RDPQ enabled card is enumerated first , MSIX vectors enabled
depends on the cards capability.

Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Signed-off-by: Sathya Prakash <sathya.prakash@broadcom.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index a1a5ceb..4ea81e1 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1959,7 +1959,7 @@ _base_enable_msix(struct MPT3SAS_ADAPTER *ioc)
 {
 	struct msix_entry *entries, *a;
 	int r;
-	int i;
+	int i, local_max_msix_vectors;
 	u8 try_msix = 0;
 
 	if (msix_disable == -1 || msix_disable == 0)
@@ -1979,13 +1979,15 @@ _base_enable_msix(struct MPT3SAS_ADAPTER *ioc)
 	  ioc->cpu_count, max_msix_vectors);
 
 	if (!ioc->rdpq_array_enable && max_msix_vectors == -1)
-		max_msix_vectors = 8;
+		local_max_msix_vectors = 8;
+	else
+		local_max_msix_vectors = max_msix_vectors;
 
-	if (max_msix_vectors > 0) {
-		ioc->reply_queue_count = min_t(int, max_msix_vectors,
+	if (local_max_msix_vectors > 0) {
+		ioc->reply_queue_count = min_t(int, local_max_msix_vectors,
 			ioc->reply_queue_count);
 		ioc->msix_vector_count = ioc->reply_queue_count;
-	} else if (max_msix_vectors == 0)
+	} else if (local_max_msix_vectors == 0)
 		goto try_ioapic;
 
 	if (ioc->msix_vector_count < ioc->cpu_count)
-- 
1.8.3.1

  parent reply	other threads:[~2016-10-20 12:21 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20 12:20 [PATCH 00/10] mpt3sas driver Enhancements and Suganath Prabu S
2016-10-20 12:20 ` [PATCH 01/10] mpt3sas: Fix for improper info displayed in var log, while blocking or unblocking the device Suganath Prabu S
2016-10-24 14:44   ` Hannes Reinecke
2016-10-25 14:37   ` Tomas Henzl
2016-10-20 12:20 ` Suganath Prabu S [this message]
2016-10-24 14:44   ` [PATCH 02/10] mpt3sas: Fix for incorrect numbers for MSIX vectors enabled when non RDPQ card is enumerated first Hannes Reinecke
2016-10-25 14:38   ` Tomas Henzl
2016-10-20 12:20 ` [PATCH 03/10] mpt3sas: Implement device_remove_in_progress check in IOCTL path Suganath Prabu S
2016-10-24 14:47   ` Hannes Reinecke
2016-10-25  9:19     ` Suganath Prabu Subramani
2016-10-25  9:51       ` Hannes Reinecke
2016-10-25 10:36         ` Suganath Prabu Subramani
2016-10-20 12:20 ` [PATCH 04/10] mpt3sas: Removing unused macro "MPT_DEVICE_TLR_ON" Suganath Prabu S
2016-10-24 14:47   ` Hannes Reinecke
2016-10-25 14:38   ` Tomas Henzl
2016-10-20 12:20 ` [PATCH 05/10] mpt3sas: Bump driver version as "14.100.00.00" Suganath Prabu S
2016-10-24 14:48   ` Hannes Reinecke
2016-10-20 12:20 ` [PATCH 06/10] mpt3sas: Added Device ID's for SAS35 devices and updated MPI header Suganath Prabu S
2016-10-24 14:49   ` Hannes Reinecke
2016-10-25 14:40   ` Tomas Henzl
2016-10-20 12:20 ` [PATCH 07/10] mpt3sas: Increased/Additional MSIX support for SAS35 devices Suganath Prabu S
2016-10-24 14:50   ` Hannes Reinecke
2016-10-25 14:41   ` Tomas Henzl
2016-10-20 12:20 ` [PATCH 08/10] mpt3sas: set EEDP-escape-flags " Suganath Prabu S
2016-10-24 14:51   ` Hannes Reinecke
2016-10-25 14:42   ` Tomas Henzl
2016-10-20 12:20 ` [PATCH 09/10] mpt3sas: Use the new MPI 2.6 32-bit Atomic Request Descriptors " Suganath Prabu S
2016-10-24 14:52   ` Hannes Reinecke
2016-10-25 14:47   ` Tomas Henzl
2016-10-20 12:20 ` [PATCH 10/10] mpt3sas: Fix for Endianness issue Suganath Prabu S
2016-10-24 14:53   ` Hannes Reinecke
2016-10-25 14:48   ` Tomas Henzl
2016-10-25  1:17 ` [PATCH 00/10] mpt3sas driver Enhancements and Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1476966018-10457-3-git-send-email-suganath-prabu.subramani@broadcom.com \
    --to=suganath-prabu.subramani@broadcom.com \
    --cc=JBottomley@Parallels.com \
    --cc=Sathya.Prakash@broadcom.com \
    --cc=chaitra.basappa@broadcom.com \
    --cc=hch@infradead.org \
    --cc=jejb@kernel.org \
    --cc=kashyap.desai@broadcom.com \
    --cc=krishnaraddi.mankani@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sreekanth.reddy@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®