Commit 8e0e063a authored by Quinn Tran's avatar Quinn Tran Committed by Martin K. Petersen

scsi: qla2xxx: Fix FCP-SCSI FC4 flag passing error

This patch fixes issue where incorrect flag was used for sending
switch commands.

Link: https://lore.kernel.org/r/20200226224022.24518-5-hmadhani@marvell.com
Fixes: e8c72ba5 ("[SCSI] qla2xxx: Use GFF_ID to check FCP-SCSI FC4 type before logging into Nx_Ports")
Fixes: a4239945 ("scsi: qla2xxx: Add switch command to simplify fabric discovery")
Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Signed-off-by: default avatarQuinn Tran <qutran@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 37efd51f
...@@ -2733,7 +2733,7 @@ qla2x00_gff_id(scsi_qla_host_t *vha, sw_info_t *list) ...@@ -2733,7 +2733,7 @@ qla2x00_gff_id(scsi_qla_host_t *vha, sw_info_t *list)
for (i = 0; i < ha->max_fibre_devices; i++) { for (i = 0; i < ha->max_fibre_devices; i++) {
/* Set default FC4 Type as UNKNOWN so the default is to /* Set default FC4 Type as UNKNOWN so the default is to
* Process this port */ * Process this port */
list[i].fc4_type = FC4_TYPE_UNKNOWN; list[i].fc4_type = 0;
/* Do not attempt GFF_ID if we are not FWI_2 capable */ /* Do not attempt GFF_ID if we are not FWI_2 capable */
if (!IS_FWI2_CAPABLE(ha)) if (!IS_FWI2_CAPABLE(ha))
...@@ -3083,7 +3083,7 @@ void qla24xx_handle_gpnid_event(scsi_qla_host_t *vha, struct event_arg *ea) ...@@ -3083,7 +3083,7 @@ void qla24xx_handle_gpnid_event(scsi_qla_host_t *vha, struct event_arg *ea)
"%s %d %8phC post new sess\n", "%s %d %8phC post new sess\n",
__func__, __LINE__, ea->port_name); __func__, __LINE__, ea->port_name);
qla24xx_post_newsess_work(vha, &ea->id, qla24xx_post_newsess_work(vha, &ea->id,
ea->port_name, NULL, NULL, FC4_TYPE_UNKNOWN); ea->port_name, NULL, NULL, 0);
} }
} }
} }
......
...@@ -1043,7 +1043,7 @@ static void qla24xx_async_gnl_sp_done(srb_t *sp, int res) ...@@ -1043,7 +1043,7 @@ static void qla24xx_async_gnl_sp_done(srb_t *sp, int res)
__func__, __LINE__, (u8 *)&wwn, id.b24); __func__, __LINE__, (u8 *)&wwn, id.b24);
wwnn = wwn_to_u64(e->node_name); wwnn = wwn_to_u64(e->node_name);
qla24xx_post_newsess_work(vha, &id, (u8 *)&wwn, qla24xx_post_newsess_work(vha, &id, (u8 *)&wwn,
(u8 *)&wwnn, NULL, FC4_TYPE_UNKNOWN); (u8 *)&wwnn, NULL, 0);
} }
} }
...@@ -5828,7 +5828,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha) ...@@ -5828,7 +5828,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha)
/* Bypass ports whose FCP-4 type is not FCP_SCSI */ /* Bypass ports whose FCP-4 type is not FCP_SCSI */
if (ql2xgffidenable && if (ql2xgffidenable &&
(!(new_fcport->fc4_type & FS_FC4TYPE_FCP) && (!(new_fcport->fc4_type & FS_FC4TYPE_FCP) &&
new_fcport->fc4_type != FC4_TYPE_UNKNOWN)) new_fcport->fc4_type != 0))
continue; continue;
spin_lock_irqsave(&vha->hw->tgt.sess_lock, flags); spin_lock_irqsave(&vha->hw->tgt.sess_lock, flags);
......
...@@ -4739,11 +4739,11 @@ static int qlt_handle_login(struct scsi_qla_host *vha, ...@@ -4739,11 +4739,11 @@ static int qlt_handle_login(struct scsi_qla_host *vha,
qla24xx_post_newsess_work(vha, &port_id, qla24xx_post_newsess_work(vha, &port_id,
iocb->u.isp24.port_name, iocb->u.isp24.port_name,
iocb->u.isp24.u.plogi.node_name, iocb->u.isp24.u.plogi.node_name,
pla, FC4_TYPE_UNKNOWN); pla, 0);
else else
qla24xx_post_newsess_work(vha, &port_id, qla24xx_post_newsess_work(vha, &port_id,
iocb->u.isp24.port_name, NULL, iocb->u.isp24.port_name, NULL,
pla, FC4_TYPE_UNKNOWN); pla, 0);
goto out; goto out;
} }
......
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