mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tony Battersby <tonyb@cybernetics.com>
To: Nilesh Javali <njavali@marvell.com>,
	GR-QLogic-Storage-Upstream@marvell.com,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	target-devel@vger.kernel.org, scst-devel@lists.sourceforge.net,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Dmitry Bogdanov <d.bogdanov@yadro.com>,
	Xose Vazquez Perez <xose.vazquez@gmail.com>
Subject: [PATCH v3 02/16] scsi: qla2xxx: fix initiator mode with qlini_mode=exclusive
Date: Mon, 10 Nov 2025 10:48:45 -0500	[thread overview]
Message-ID: <1715ec14-ba9a-45dc-9cf2-d41aa6b81b5e@cybernetics.com> (raw)
In-Reply-To: <aaea0ab0-da8b-4153-9369-60db7507ff7a@cybernetics.com>

When given the module parameter qlini_mode=exclusive, qla2xxx in
initiator mode is initially unable to successfully send SCSI commands to
devices it finds while scanning, resulting in an escalating series of
resets until an adapter reset clears the issue.  Fix by checking the
active mode instead of the module parameter.

Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
---

v2 -> v3: no changes

v1 -> v2: no changes

 drivers/scsi/qla2xxx/qla_os.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index a52293972e10..f0b77f13628d 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -3438,13 +3438,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		ha->mqenable = 0;
 
 	if (ha->mqenable) {
-		bool startit = false;
-
-		if (QLA_TGT_MODE_ENABLED())
-			startit = false;
-
-		if (ql2x_ini_mode == QLA2XXX_INI_MODE_ENABLED)
-			startit = true;
+		bool startit = !!(host->active_mode & MODE_INITIATOR);
 
 		/* Create start of day qpairs for Block MQ */
 		for (i = 0; i < ha->max_qpairs; i++)
-- 
2.43.0



  parent reply	other threads:[~2025-11-10 15:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-10 15:46 [PATCH v3 00/16] qla2xxx target mode improvements Tony Battersby
2025-11-10 15:47 ` [PATCH v3 01/16] Revert "scsi: qla2xxx: Perform lockless command completion in abort path" Tony Battersby
2025-11-10 15:48 ` Tony Battersby [this message]
2025-11-10 15:50 ` [PATCH v3 03/16] scsi: qla2xxx: fix lost interrupts with qlini_mode=disabled Tony Battersby
2025-11-10 15:51 ` [PATCH v3 04/16] scsi: qla2xxx: use reinit_completion on mbx_intr_comp Tony Battersby
2025-11-10 15:52 ` [PATCH v3 05/16] scsi: qla2xxx: remove code for unsupported hardware Tony Battersby
2025-11-10 15:54 ` [PATCH v3 06/16] scsi: qla2xxx: improve debug output for term exchange Tony Battersby
2025-11-10 15:55 ` [PATCH v3 07/16] scsi: qla2xxx: fix term exchange when cmd_sent_to_fw == 1 Tony Battersby
2025-11-10 15:57 ` [PATCH v3 09/16] scsi: qla2xxx: fix races with aborting commands Tony Battersby
2025-11-10 15:58 ` [PATCH v3 10/16] scsi: qla2xxx: improve checks in qlt_xmit_response / qlt_rdy_to_xfer Tony Battersby
2025-11-10 15:59 ` [PATCH v3 11/16] scsi: qla2xxx: fix TMR failure handling Tony Battersby
2025-11-10 16:01 ` [PATCH v3 12/16] scsi: qla2xxx: fix invalid memory access with big CDBs Tony Battersby
2025-11-10 16:02 ` [PATCH v3 13/16] scsi: qla2xxx: add cmd->rsp_sent Tony Battersby
2025-11-10 16:03 ` [PATCH v3 14/16] scsi: qla2xxx: improve cmd logging Tony Battersby
2025-11-10 16:04 ` [PATCH v3 15/16] scsi: qla2xxx: add back SRR support Tony Battersby
2025-11-10 16:05 ` [PATCH v3 16/16] scsi: qla2xxx: improve safety of cmd lookup by handle Tony Battersby
2025-11-10 16:07 ` [PATCH v3 08/16] scsi: qla2xxx: clear cmds after chip reset Tony Battersby
2025-11-12 23:19 ` [PATCH v3 00/16] qla2xxx target mode improvements Martin K. Petersen
2025-11-20  4:16 ` 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=1715ec14-ba9a-45dc-9cf2-d41aa6b81b5e@cybernetics.com \
    --to=tonyb@cybernetics.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=d.bogdanov@yadro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=njavali@marvell.com \
    --cc=scst-devel@lists.sourceforge.net \
    --cc=target-devel@vger.kernel.org \
    --cc=xose.vazquez@gmail.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®