Re: [PATCH v2 03/12] qla2xxx: fix stuck session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Mar 29, 2021, at 3:52 AM, Nilesh Javali <njavali@xxxxxxxxxxx> wrote:
> 
> From: Quinn Tran <qutran@xxxxxxxxxxx>
> 
> Session was stuck due to explicit logout to target was timed out.
> The target was in an unresponsive state. This timeout induced an error
> to the GNL command from moving forward.
> 
> Signed-off-by: Quinn Tran <qutran@xxxxxxxxxxx>
> Signed-off-by: Nilesh Javali <njavali@xxxxxxxxxxx>
> Tested-by: Laurence Oberman <loberman@xxxxxxxxxx>
> ---
> drivers/scsi/qla2xxx/qla_init.c   | 1 +
> drivers/scsi/qla2xxx/qla_target.c | 6 +++++-
> 2 files changed, 6 insertions(+), 1 deletion(-)
> 
> 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 c48daf52725d..0d9117a30ff6 100644
> --- a/drivers/scsi/qla2xxx/qla_target.c
> +++ b/drivers/scsi/qla2xxx/qla_target.c
> @@ -1029,7 +1029,11 @@ void qlt_free_session_done(struct work_struct *work)
> 			}
> 			msleep(100);
> 			cnt++;
> -			if (cnt > 200)
> +			/*
> +			 * wait for logout to complete before advance. Otherwise,
> +			 * straddling logout can interfere with relogin.
> +			 */

How about this ??

			/*
			 * Driver timeout is set to 22 Sec, update count value to loop 
			 * enough time for log-out to complete before advancing. Otherwise,
			 * straddling log-out can interfere with re-login attempt.
			 */
> +			if (cnt > 230)
> 				break;
> 		}
> 

> -- 
> 2.19.0.rc0
> 

--
Himanshu Madhani	 Oracle Linux Engineering





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux