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>,
	<agurumurthy@marvell.com>, <sdeodhar@marvell.com>,
	<emilne@redhat.com>, <jmeneghi@redhat.com>
Subject: [PATCH v2 05/11] qla2xxx: NVME|FCP prefer flag not being honored
Date: Tue, 27 Feb 2024 22:11:21 +0530	[thread overview]
Message-ID: <20240227164127.36465-6-njavali@marvell.com> (raw)
In-Reply-To: <20240227164127.36465-1-njavali@marvell.com>

From: Quinn Tran <qutran@marvell.com>

Changing of [FCP|NVME] prefer flag in flash has
no effect on driver. For device that support both FCP + NVME
over the same connection, driver continue to connect to this device
using the previous successful login mode.

On completion of flash update, adapter will be reset. Driver will
reset the prefer flag based on setting from flash.

Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
---
 drivers/scsi/qla2xxx/qla_init.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 3f5a933e60d0..8377624d76c9 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -7501,6 +7501,7 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)
 	struct scsi_qla_host *vp, *tvp;
 	struct req_que *req = ha->req_q_map[0];
 	unsigned long flags;
+	fc_port_t *fcport;
 
 	if (vha->flags.online) {
 		qla2x00_abort_isp_cleanup(vha);
@@ -7569,6 +7570,15 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)
 			       "ISP Abort - ISP reg disconnect post nvmram config, exiting.\n");
 			return status;
 		}
+
+		/* User may have updated [fcp|nvme] prefer in flash */
+		list_for_each_entry(fcport, &vha->vp_fcports, list) {
+			if (NVME_PRIORITY(ha, fcport))
+				fcport->do_prli_nvme = 1;
+			else
+				fcport->do_prli_nvme = 0;
+		}
+
 		if (!qla2x00_restart_isp(vha)) {
 			clear_bit(RESET_MARKER_NEEDED, &vha->dpc_flags);
 
@@ -7639,6 +7649,14 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)
 				atomic_inc(&vp->vref_count);
 				spin_unlock_irqrestore(&ha->vport_slock, flags);
 
+				/* User may have updated [fcp|nvme] prefer in flash */
+				list_for_each_entry(fcport, &vp->vp_fcports, list) {
+					if (NVME_PRIORITY(ha, fcport))
+						fcport->do_prli_nvme = 1;
+					else
+						fcport->do_prli_nvme = 0;
+				}
+
 				qla2x00_vp_abort_isp(vp);
 
 				spin_lock_irqsave(&ha->vport_slock, flags);
-- 
2.23.1


  parent reply	other threads:[~2024-02-27 17:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 16:41 [PATCH v2 00/11] qla2xxx misc. bug fixes Nilesh Javali
2024-02-27 16:41 ` [PATCH v2 01/11] qla2xxx: Prevent command send on chip reset Nilesh Javali
2024-02-27 16:41 ` [PATCH v2 02/11] qla2xxx: Fix N2N stuck connection Nilesh Javali
2024-02-27 16:41 ` [PATCH v2 03/11] qla2xxx: Split FCE|EFT trace control Nilesh Javali
2024-02-27 16:41 ` [PATCH v2 04/11] qla2xxx: Update manufacturer detail Nilesh Javali
2024-02-27 16:41 ` Nilesh Javali [this message]
2024-02-27 16:41 ` [PATCH v2 06/11] qla2xxx: Fix command flush on cable pull Nilesh Javali
2024-02-27 16:41 ` [PATCH v2 07/11] qla2xxx: Fix double free of the ha->vp_map pointer Nilesh Javali
2024-02-27 16:41 ` [PATCH v2 08/11] qla2xxx: Fix double free of fcport Nilesh Javali
2024-02-27 16:41 ` [PATCH v2 09/11] qla2xxx: change debug message during driver unload Nilesh Javali
2024-02-27 16:41 ` [PATCH v2 10/11] qla2xxx: Delay IO Abort on PCI error Nilesh Javali
2024-02-27 16:41 ` [PATCH v2 11/11] qla2xxx: Update version to 10.02.09.200-k Nilesh Javali
2024-03-10 22:48 ` [PATCH v2 00/11] qla2xxx misc. bug fixes 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=20240227164127.36465-6-njavali@marvell.com \
    --to=njavali@marvell.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=agurumurthy@marvell.com \
    --cc=emilne@redhat.com \
    --cc=jmeneghi@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sdeodhar@marvell.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.