Commit 11efe875 authored by Quinn Tran's avatar Quinn Tran Committed by Martin K. Petersen

scsi: qla2xxx: Serialize fc_port alloc in N2N

For N2N, fc_port struct is created during report id acquisition.  At
later time, the loop resync (fabric, n2n, loop) would trigger the rest
of the login using the created fc_port struct.  The loop resync logic
can trigger another fc_port allocation if the 1st allocation was not
able to execute.  This patch prevents the 2nd allocation trigger.

Link: https://lore.kernel.org/r/20200226224022.24518-15-hmadhani@marvell.comSigned-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 ab391abd
...@@ -5147,6 +5147,7 @@ qla2x00_configure_local_loop(scsi_qla_host_t *vha) ...@@ -5147,6 +5147,7 @@ qla2x00_configure_local_loop(scsi_qla_host_t *vha)
set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags); set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
} }
return QLA_FUNCTION_FAILED;
} }
found_devs = 0; found_devs = 0;
......
...@@ -5203,9 +5203,8 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e) ...@@ -5203,9 +5203,8 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e)
fcport->n2n_flag = 1; fcport->n2n_flag = 1;
} }
fcport->fw_login_state = 0; fcport->fw_login_state = 0;
/*
* wait link init done before sending login schedule_delayed_work(&vha->scan.scan_work, 5);
*/
} else { } else {
qla24xx_fcport_handle_login(vha, fcport); qla24xx_fcport_handle_login(vha, fcport);
} }
......
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