scsi: qla2xxx: Serialize fc_port alloc in N2N
authorQuinn Tran <qutran@marvell.com>
Wed, 26 Feb 2020 22:40:18 +0000 (14:40 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 29 Feb 2020 01:32:35 +0000 (20:32 -0500)
commit11efe8755d73efd153d6459240866b6d52448f19
tree9c3f38647b6c78f9b75db0d1e8c3d2a629b29546
parentab391abdc191c2a2874098df86d1fe4b9762ef60
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.com
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_os.c