Skip to content

Commit

Permalink
scsi: qla2xxx: NVME|FCP prefer flag not being honored
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Quinn Tran authored and martinkpetersen committed Mar 10, 2024
1 parent 688fa06 commit 69aecdd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 69aecdd

Please sign in to comment.