[SRU] [Focal] [PATCH v4 1/4] scsi: qla2xxx: Serialize fc_port alloc in N2N
Nilesh Javali
njavali at marvell.com
Thu Jun 10 10:35:16 UTC 2021
From: Quinn Tran <qutran at marvell.com>
BugLink: https://bugs.launchpad.net/bugs/1860724
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.com
Signed-off-by: Himanshu Madhani <hmadhani at marvell.com>
Signed-off-by: Quinn Tran <qutran at marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen at oracle.com>
(cherry picked from commit 11efe8755d73efd153d6459240866b6d52448f19)
Signed-off-by: Nilesh Javali <njavali at marvell.com>
---
drivers/scsi/qla2xxx/qla_init.c | 1 +
drivers/scsi/qla2xxx/qla_os.c | 5 ++---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 643b8ae36cbe..f960065ed12f 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -5107,6 +5107,7 @@ qla2x00_configure_local_loop(scsi_qla_host_t *vha)
set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
}
+ return QLA_FUNCTION_FAILED;
}
found_devs = 0;
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 052ce7881407..8437dc2e71ca 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -5167,9 +5167,8 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e)
fcport->n2n_flag = 1;
}
fcport->fw_login_state = 0;
- /*
- * wait link init done before sending login
- */
+
+ schedule_delayed_work(&vha->scan.scan_work, 5);
} else {
qla24xx_fcport_handle_login(vha, fcport);
}
--
2.27.0
More information about the kernel-team
mailing list