scsi: qla2xxx: Fix stuck session

Session was stuck due to explicit logout to target timing out.  The target
was in an unresponsive state. This timeout induced an error to the GNL
command from moving forward.

Link: https://lore.kernel.org/r/20210329085229.4367-4-njavali@marvell.com
Tested-by: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Quinn Tran 2021-03-29 01:52:20 -07:00 committed by Martin K. Petersen
parent a63f4c4541
commit c358a3d92b
2 changed files with 7 additions and 1 deletions

View File

@ -718,6 +718,7 @@ static void qla24xx_handle_gnl_done_event(scsi_qla_host_t *vha,
ql_dbg(ql_dbg_disc, vha, 0x20e0,
"%s %8phC login gen changed\n",
__func__, fcport->port_name);
set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
return;
}

View File

@ -1029,7 +1029,12 @@ void qlt_free_session_done(struct work_struct *work)
}
msleep(100);
cnt++;
if (cnt > 200)
/*
* Driver timeout is set to 22 Sec, update count value to loop
* long enough for log-out to complete before advancing. Otherwise,
* straddling logout can interfere with re-login attempt.
*/
if (cnt > 230)
break;
}