Commit f5a2b219 authored by Martin Wilck's avatar Martin Wilck Committed by Martin K. Petersen

scsi: qla2xxx: initialize fc4_type_priority

ha->fc4_type_priority is currently initialized only in
qla81xx_nvram_config(). That makes it default to NVMe for other adapters.
Fix it.

Fixes: 84ed362a ("scsi: qla2xxx: Dual FCP-NVMe target port support")
Link: https://lore.kernel.org/r/20191107224839.32417-2-martin.wilck@suse.comTested-by: default avatarDavid Bond <dbond@suse.com>
Acked-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin Wilck <mwilck@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 162b805e
...@@ -2218,8 +2218,18 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha) ...@@ -2218,8 +2218,18 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha)
ql_dbg(ql_dbg_init, vha, 0x0061, ql_dbg(ql_dbg_init, vha, 0x0061,
"Configure NVRAM parameters...\n"); "Configure NVRAM parameters...\n");
/* Let priority default to FCP, can be overridden by nvram_config */
ha->fc4_type_priority = FC4_PRIORITY_FCP;
ha->isp_ops->nvram_config(vha); ha->isp_ops->nvram_config(vha);
if (ha->fc4_type_priority != FC4_PRIORITY_FCP &&
ha->fc4_type_priority != FC4_PRIORITY_NVME)
ha->fc4_type_priority = FC4_PRIORITY_FCP;
ql_log(ql_log_info, vha, 0xffff, "FC4 priority set to %s\n",
ha->fc4_type_priority == FC4_PRIORITY_FCP ? "FCP" : "NVMe");
if (ha->flags.disable_serdes) { if (ha->flags.disable_serdes) {
/* Mask HBA via NVRAM settings? */ /* Mask HBA via NVRAM settings? */
ql_log(ql_log_info, vha, 0x0077, ql_log(ql_log_info, vha, 0x0077,
...@@ -8525,8 +8535,6 @@ qla81xx_nvram_config(scsi_qla_host_t *vha) ...@@ -8525,8 +8535,6 @@ qla81xx_nvram_config(scsi_qla_host_t *vha)
/* Determine NVMe/FCP priority for target ports */ /* Determine NVMe/FCP priority for target ports */
ha->fc4_type_priority = qla2xxx_get_fc4_priority(vha); ha->fc4_type_priority = qla2xxx_get_fc4_priority(vha);
ql_log(ql_log_info, vha, 0xffff, "FC4 priority set to %s\n",
ha->fc4_type_priority & BIT_0 ? "FCP" : "NVMe");
if (rval) { if (rval) {
ql_log(ql_log_warn, vha, 0x0076, ql_log(ql_log_warn, vha, 0x0076,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment