From 7b381444ec2364f67eabd7577f32d804ef7f4a0e Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Mar 28 2024 14:28:02 +0000 Subject: scsi: qla2xxx: NVME|FCP prefer flag not being honored (bsc#1221816). --- diff --git a/patches.suse/scsi-qla2xxx-NVME-FCP-prefer-flag-not-being-honored.patch b/patches.suse/scsi-qla2xxx-NVME-FCP-prefer-flag-not-being-honored.patch new file mode 100644 index 0000000..ab64702 --- /dev/null +++ b/patches.suse/scsi-qla2xxx-NVME-FCP-prefer-flag-not-being-honored.patch @@ -0,0 +1,68 @@ +From: Quinn Tran +Date: Tue, 27 Feb 2024 22:11:21 +0530 +Subject: scsi: qla2xxx: NVME|FCP prefer flag not being honored +Patch-mainline: Queued in subsystem maintainer repository +Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git +Git-commit: 69aecdd410106dc3a8f543a4f7ec6379b995b8d0 +References: bsc#1221816 + +Changing of [FCP|NVME] prefer flag in flash has no effect on driver. For +device that supports both FCP + NVMe over the same connection, driver +continues 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 +Signed-off-by: Nilesh Javali +Link: https://lore.kernel.org/r/20240227164127.36465-6-njavali@marvell.com +Reviewed-by: Himanshu Madhani +Signed-off-by: Martin K. Petersen +Acked-by: Daniel Wagner +--- + drivers/scsi/qla2xxx/qla_init.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +--- 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); diff --git a/series.conf b/series.conf index a1a5005..6725db0 100644 --- a/series.conf +++ b/series.conf @@ -20059,6 +20059,7 @@ patches.suse/scsi-qla2xxx-Fix-N2N-stuck-connection.patch patches.suse/scsi-qla2xxx-Split-FCE-EFT-trace-control.patch patches.suse/scsi-qla2xxx-Update-manufacturer-detail.patch + patches.suse/scsi-qla2xxx-NVME-FCP-prefer-flag-not-being-honored.patch ######################################################## # end of sorted patches