All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nilesh Javali <njavali@marvell.com>
To: <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <GR-QLogic-Storage-Upstream@marvell.com>
Subject: [PATCH v2 04/11] qla2xxx: Turn off multi-queue for 8G adapter
Date: Wed, 15 Jun 2022 22:35:01 -0700	[thread overview]
Message-ID: <20220616053508.27186-5-njavali@marvell.com> (raw)
In-Reply-To: <20220616053508.27186-1-njavali@marvell.com>

From: Quinn Tran <qutran@marvell.com>

For 8G adapter, multi-queue was enabled accidentally.
This patch make sure multi-queue is not enabled accidentally.

Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_def.h |  4 ++--
 drivers/scsi/qla2xxx/qla_isr.c | 16 ++++++----------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 74d4234e5a31..89cb6c24258d 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -4273,8 +4273,8 @@ struct qla_hw_data {
 #define IS_OEM_001(ha)          ((ha)->device_type & DT_OEM_001)
 #define HAS_EXTENDED_IDS(ha)    ((ha)->device_type & DT_EXTENDED_IDS)
 #define IS_CT6_SUPPORTED(ha)	((ha)->device_type & DT_CT6_SUPPORTED)
-#define IS_MQUE_CAPABLE(ha)	((ha)->mqenable || IS_QLA83XX(ha) || \
-				IS_QLA27XX(ha) || IS_QLA28XX(ha))
+#define IS_MQUE_CAPABLE(ha)	(IS_QLA83XX(ha) || IS_QLA27XX(ha) || \
+				 IS_QLA28XX(ha))
 #define IS_BIDI_CAPABLE(ha) \
     (IS_QLA25XX(ha) || IS_QLA2031(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha))
 /* Bit 21 of fw_attributes decides the MCTP capabilities */
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 9af9b35edc27..24f9a3b116d8 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -4430,16 +4430,12 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
 	}
 
 	/* Enable MSI-X vector for response queue update for queue 0 */
-	if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
-		if (ha->msixbase && ha->mqiobase &&
-		    (ha->max_rsp_queues > 1 || ha->max_req_queues > 1 ||
-		     ql2xmqsupport))
-			ha->mqenable = 1;
-	} else
-		if (ha->mqiobase &&
-		    (ha->max_rsp_queues > 1 || ha->max_req_queues > 1 ||
-		     ql2xmqsupport))
-			ha->mqenable = 1;
+	if (IS_MQUE_CAPABLE(ha) &&
+	    (ha->msixbase && ha->mqiobase && ha->max_qpairs))
+		ha->mqenable = 1;
+	else
+		ha->mqenable = 0;
+
 	ql_dbg(ql_dbg_multiq, vha, 0xc005,
 	    "mqiobase=%p, max_rsp_queues=%d, max_req_queues=%d.\n",
 	    ha->mqiobase, ha->max_rsp_queues, ha->max_req_queues);
-- 
2.19.0.rc0


  parent reply	other threads:[~2022-06-16  5:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16  5:34 [PATCH v2 00/11] qla2xxx bug fixes Nilesh Javali
2022-06-16  5:34 ` [PATCH v2 01/11] qla2xxx: Fix excessive IO error messages by default Nilesh Javali
2022-06-16  5:34 ` [PATCH v2 02/11] qla2xxx: Add a new v2 dport diagnostic feature Nilesh Javali
2022-06-16  5:35 ` [PATCH v2 03/11] qla2xxx: Wind down adapter after pcie error Nilesh Javali
2022-06-16  5:35 ` Nilesh Javali [this message]
2022-06-16  5:35 ` [PATCH v2 05/11] qla2xxx: Fix crash due to stale srb access around IO timeouts Nilesh Javali
2022-06-16  5:35 ` [PATCH v2 06/11] qla2xxx: Fix losing FCP-2 targets during port perturbation tests Nilesh Javali
2022-06-16  5:35 ` [PATCH v2 07/11] qla2xxx: Fix losing target when it reappears during delete Nilesh Javali
2022-06-16  5:35 ` [PATCH v2 08/11] qla2xxx: Add debug prints in the device remove path Nilesh Javali
2022-06-16  5:35 ` [PATCH v2 09/11] qla2xxx: Fix losing FCP-2 targets on long port disable with IOs Nilesh Javali
2022-06-16  5:35 ` [PATCH v2 10/11] qla2xxx: Fix erroneous mailbox timeout after pci error inject Nilesh Javali
2022-06-16  5:35 ` [PATCH v2 11/11] qla2xxx: Update version to 10.02.07.700-k Nilesh Javali
2022-06-17  2:00 ` [PATCH v2 00/11] qla2xxx bug fixes Martin K. Petersen
2022-06-22  2:10 ` 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=20220616053508.27186-5-njavali@marvell.com \
    --to=njavali@marvell.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.