From: Quinn Tran Date: Wed, 8 Jun 2022 11:58:43 +0000 (-0700) Subject: scsi: qla2xxx: edif: Fix no login after app start X-Git-Tag: baikal/mips/sdk5.9~360 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=4e6910b6e41a49c45fbcd9a19823e241caa3757a;p=kernel.git scsi: qla2xxx: edif: Fix no login after app start [ Upstream commit 59720fe130242bf4d6295a0547d8fbc2799fd022 ] The scenario is this: User loaded driver but has not started authentication app. All sessions to secure device will exhaust all login attempts, fail, and in stay in deleted state. Then some time later the app is started. The driver will replenish the login retry count, trigger delete to prepare for secure login. After deletion, relogin is triggered. For the session that is already deleted, the delete trigger is a no-op. If none of the sessions trigger a relogin, no progress is made. Add a relogin trigger. Link: https://lore.kernel.org/r/20220608115849.16693-5-njavali@marvell.com Fixes: 397c4e69bdb0 ("scsi: qla2xxx: edif: Add start + stop bsgs") Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- diff --git a/drivers/scsi/qla2xxx/qla_edif.c b/drivers/scsi/qla2xxx/qla_edif.c index f7953ce17678e..c0971888a0a13 100644 --- a/drivers/scsi/qla2xxx/qla_edif.c +++ b/drivers/scsi/qla2xxx/qla_edif.c @@ -544,6 +544,7 @@ qla_edif_app_start(scsi_qla_host_t *vha, struct bsg_job *bsg_job) qlt_schedule_sess_for_deletion(fcport); qla_edif_sa_ctl_init(vha, fcport); } + set_bit(RELOGIN_NEEDED, &vha->dpc_flags); } if (vha->pur_cinfo.enode_flags != ENODE_ACTIVE) {