diff options
author | Quinn Tran <qutran@marvell.com> | 2021-03-29 01:52:20 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-03-29 22:38:58 -0400 |
commit | c358a3d92b32be89ea1c44fe75721448c0a0fec1 (patch) | |
tree | 45c36db40bb97e4288d037256eb3c14155725ad1 /drivers/scsi/qla2xxx | |
parent | a63f4c45414951ad4fbaeb5b744e37ffd137b689 (diff) | |
download | linux-stable-c358a3d92b32be89ea1c44fe75721448c0a0fec1.tar.gz linux-stable-c358a3d92b32be89ea1c44fe75721448c0a0fec1.tar.bz2 linux-stable-c358a3d92b32be89ea1c44fe75721448c0a0fec1.zip |
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>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index af237c485389..f6dc8166e7ba 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -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; } diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 67c6a2710360..7a2826149364 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -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; } |