From: Justin Tee <justintee8345@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: jsmart2021@gmail.com, Justin Tee <justintee8345@gmail.com>,
Justin Tee <justin.tee@broadcom.com>
Subject: [PATCH 1/6] lpfc: Fix WQ|CQ|EQ resource check
Date: Tue, 15 Nov 2022 17:19:16 -0800 [thread overview]
Message-ID: <20221116011921.105995-2-justintee8345@gmail.com> (raw)
In-Reply-To: <20221116011921.105995-1-justintee8345@gmail.com>
Adapter configurations with limited EQ resources may fail to initialize.
Firmware resources are queried in lpfc_sli4_read_config(). The driver
parameters cfg_irq_chann and cfg_hdw_queue are adjusted from defaults if
constrained by firmware resources.
The minimum resource check includes a special allocation for queues such
as ELS, MBOX, NVME LS. However the additional reservation was also
incorrectly applied to EQ resources.
Reordered WQ|CQ|EQ resource checks to apply the special allocation
adjustment to WQ and CQ resources only.
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
---
drivers/scsi/lpfc/lpfc_init.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index b49c39569386..a6e32ecd4151 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -10092,17 +10092,15 @@ lpfc_sli4_read_config(struct lpfc_hba *phba)
qmin = phba->sli4_hba.max_cfg_param.max_wq;
if (phba->sli4_hba.max_cfg_param.max_cq < qmin)
qmin = phba->sli4_hba.max_cfg_param.max_cq;
- if (phba->sli4_hba.max_cfg_param.max_eq < qmin)
- qmin = phba->sli4_hba.max_cfg_param.max_eq;
/*
- * Whats left after this can go toward NVME / FCP.
- * The minus 4 accounts for ELS, NVME LS, MBOX
- * plus one extra. When configured for
- * NVMET, FCP io channel WQs are not created.
+ * Reserve 4 (ELS, NVME LS, MBOX, plus one extra) and
+ * the remainder can be used for NVME / FCP.
*/
qmin -= 4;
+ if (phba->sli4_hba.max_cfg_param.max_eq < qmin)
+ qmin = phba->sli4_hba.max_cfg_param.max_eq;
- /* Check to see if there is enough for NVME */
+ /* Check to see if there is enough for default cfg */
if ((phba->cfg_irq_chann > qmin) ||
(phba->cfg_hdw_queue > qmin)) {
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
--
2.38.0
next prev parent reply other threads:[~2022-11-16 1:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 1:19 [PATCH 0/6] lpfc: Update lpfc to revision 14.2.0.9 Justin Tee
2022-11-16 1:19 ` Justin Tee [this message]
2022-11-16 1:19 ` [PATCH 2/6] lpfc: Correct bandwidth logging during receipt of congestion sync WCQE Justin Tee
2022-11-16 1:19 ` [PATCH 3/6] lpfc: Fix MI capability display in cmf_info sysfs attribute Justin Tee
2022-11-16 1:19 ` [PATCH 4/6] lpfc: Fix crash involving race between FLOGI timeout and devloss handler Justin Tee
2022-11-16 1:19 ` [PATCH 5/6] lpfc: Change default lpfc_suppress_rsp mode to off Justin Tee
2022-11-16 1:19 ` [PATCH 6/6] lpfc: Update lpfc version to 14.2.0.9 Justin Tee
2022-11-17 18:19 ` [PATCH 0/6] lpfc: Update lpfc to revision 14.2.0.9 Martin K. Petersen
2022-11-26 3:27 ` 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=20221116011921.105995-2-justintee8345@gmail.com \
--to=justintee8345@gmail.com \
--cc=jsmart2021@gmail.com \
--cc=justin.tee@broadcom.com \
--cc=linux-scsi@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