stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: sdeodhar@marvell.com, himanshu.madhani@oracle.com,
	martin.petersen@oracle.com, njavali@marvell.com
Cc: <stable@vger.kernel.org>
Subject: FAILED: patch "[PATCH] scsi: qla2xxx: Increase max limit of ql2xnvme_queues" failed to apply to 5.17-stable tree
Date: Sat, 02 Apr 2022 16:30:17 +0200	[thread overview]
Message-ID: <1648909817226192@kroah.com> (raw)


The patch below does not apply to the 5.17-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 3648bcf1c1374e9f42d241d83e2e50c0ef07a852 Mon Sep 17 00:00:00 2001
From: Shreyas Deodhar <sdeodhar@marvell.com>
Date: Thu, 10 Mar 2022 01:26:03 -0800
Subject: [PATCH] scsi: qla2xxx: Increase max limit of ql2xnvme_queues

Increase max limit of ql2xnvme_queues to (max_qpair - 1).

Link: https://lore.kernel.org/r/20220310092604.22950-13-njavali@marvell.com
Fixes: 65120de26a54 ("scsi: qla2xxx: Add ql2xnvme_queues module param to configure number of NVMe queues")
Cc: stable@vger.kernel.org
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Shreyas Deodhar <sdeodhar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c
index 794a95b2e3b4..87c9404aa401 100644
--- a/drivers/scsi/qla2xxx/qla_nvme.c
+++ b/drivers/scsi/qla2xxx/qla_nvme.c
@@ -799,17 +799,22 @@ int qla_nvme_register_hba(struct scsi_qla_host *vha)
 	ha = vha->hw;
 	tmpl = &qla_nvme_fc_transport;
 
-	if (ql2xnvme_queues < MIN_NVME_HW_QUEUES || ql2xnvme_queues > MAX_NVME_HW_QUEUES) {
+	if (ql2xnvme_queues < MIN_NVME_HW_QUEUES) {
 		ql_log(ql_log_warn, vha, 0xfffd,
-		    "ql2xnvme_queues=%d is out of range(MIN:%d - MAX:%d). Resetting ql2xnvme_queues to:%d\n",
-		    ql2xnvme_queues, MIN_NVME_HW_QUEUES, MAX_NVME_HW_QUEUES,
-		    DEF_NVME_HW_QUEUES);
+		    "ql2xnvme_queues=%d is lower than minimum queues: %d. Resetting ql2xnvme_queues to:%d\n",
+		    ql2xnvme_queues, MIN_NVME_HW_QUEUES, DEF_NVME_HW_QUEUES);
 		ql2xnvme_queues = DEF_NVME_HW_QUEUES;
+	} else if (ql2xnvme_queues > (ha->max_qpairs - 1)) {
+		ql_log(ql_log_warn, vha, 0xfffd,
+		       "ql2xnvme_queues=%d is greater than available IRQs: %d. Resetting ql2xnvme_queues to: %d\n",
+		       ql2xnvme_queues, (ha->max_qpairs - 1),
+		       (ha->max_qpairs - 1));
+		ql2xnvme_queues = ((ha->max_qpairs - 1));
 	}
 
 	qla_nvme_fc_transport.max_hw_queues =
 	    min((uint8_t)(ql2xnvme_queues),
-		(uint8_t)(ha->max_qpairs ? ha->max_qpairs : 1));
+		(uint8_t)((ha->max_qpairs - 1) ? (ha->max_qpairs - 1) : 1));
 
 	ql_log(ql_log_info, vha, 0xfffb,
 	       "Number of NVME queues used for this port: %d\n",
diff --git a/drivers/scsi/qla2xxx/qla_nvme.h b/drivers/scsi/qla2xxx/qla_nvme.h
index d0e3c0e07baa..d299478371b2 100644
--- a/drivers/scsi/qla2xxx/qla_nvme.h
+++ b/drivers/scsi/qla2xxx/qla_nvme.h
@@ -14,7 +14,6 @@
 #include "qla_dsd.h"
 
 #define MIN_NVME_HW_QUEUES 1
-#define MAX_NVME_HW_QUEUES 128
 #define DEF_NVME_HW_QUEUES 8
 
 #define NVME_ATIO_CMD_OFF 32
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 81451c11eef4..762229d495a8 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -344,7 +344,6 @@ MODULE_PARM_DESC(ql2xnvme_queues,
 	"Number of NVMe Queues that can be configured.\n"
 	"Final value will be min(ql2xnvme_queues, num_cpus,num_chip_queues)\n"
 	"1 - Minimum number of queues supported\n"
-	"128 - Maximum number of queues supported\n"
 	"8 - Default value");
 
 static struct scsi_transport_template *qla2xxx_transport_template = NULL;


             reply	other threads:[~2022-04-02 14:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02 14:30 gregkh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-04-02 14:30 FAILED: patch "[PATCH] scsi: qla2xxx: Increase max limit of ql2xnvme_queues" failed to apply to 5.17-stable tree gregkh

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=1648909817226192@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=himanshu.madhani@oracle.com \
    --cc=martin.petersen@oracle.com \
    --cc=njavali@marvell.com \
    --cc=sdeodhar@marvell.com \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).