Skip to content

Commit 69aecdd

Browse files
Quinn Tranmartinkpetersen
authored andcommitted
scsi: qla2xxx: NVME|FCP prefer flag not being honored
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: [email protected] Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 688fa06 commit 69aecdd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7501,6 +7501,7 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)
75017501
struct scsi_qla_host *vp, *tvp;
75027502
struct req_que *req = ha->req_q_map[0];
75037503
unsigned long flags;
7504+
fc_port_t *fcport;
75047505

75057506
if (vha->flags.online) {
75067507
qla2x00_abort_isp_cleanup(vha);
@@ -7569,6 +7570,15 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)
75697570
"ISP Abort - ISP reg disconnect post nvmram config, exiting.\n");
75707571
return status;
75717572
}
7573+
7574+
/* User may have updated [fcp|nvme] prefer in flash */
7575+
list_for_each_entry(fcport, &vha->vp_fcports, list) {
7576+
if (NVME_PRIORITY(ha, fcport))
7577+
fcport->do_prli_nvme = 1;
7578+
else
7579+
fcport->do_prli_nvme = 0;
7580+
}
7581+
75727582
if (!qla2x00_restart_isp(vha)) {
75737583
clear_bit(RESET_MARKER_NEEDED, &vha->dpc_flags);
75747584

@@ -7639,6 +7649,14 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)
76397649
atomic_inc(&vp->vref_count);
76407650
spin_unlock_irqrestore(&ha->vport_slock, flags);
76417651

7652+
/* User may have updated [fcp|nvme] prefer in flash */
7653+
list_for_each_entry(fcport, &vp->vp_fcports, list) {
7654+
if (NVME_PRIORITY(ha, fcport))
7655+
fcport->do_prli_nvme = 1;
7656+
else
7657+
fcport->do_prli_nvme = 0;
7658+
}
7659+
76427660
qla2x00_vp_abort_isp(vp);
76437661

76447662
spin_lock_irqsave(&ha->vport_slock, flags);

0 commit comments

Comments
 (0)