diff mbox series

[06/10] qla2xxx: Fix stalled login

Message ID 20221214045014.19362-7-njavali@marvell.com
State Superseded
Headers show
Series Misc. qla2xxx driver bug fixes | expand

Commit Message

Nilesh Javali Dec. 14, 2022, 4:50 a.m. UTC
From: Quinn Tran <qutran@marvell.com>

If a login failed due to low FW resource, the session can stall
from being connected. Reset session state to allow relogin
logic to re-drive the connection.

Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_init.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Himanshu Madhani Dec. 15, 2022, 5:37 p.m. UTC | #1
> On Dec 13, 2022, at 8:50 PM, Nilesh Javali <njavali@marvell.com> wrote:
> 
> From: Quinn Tran <qutran@marvell.com>
> 
> If a login failed due to low FW resource, the session can stall
> from being connected. Reset session state to allow relogin
> logic to re-drive the connection.
> 
> Signed-off-by: Quinn Tran <qutran@marvell.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> ---
> drivers/scsi/qla2xxx/qla_init.c | 6 ++++++
> 1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
> index fd27fb511479..745fee298d56 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -390,6 +390,12 @@ qla2x00_async_login(struct scsi_qla_host *vha, fc_port_t *fcport,
> 	fcport->flags &= ~FCF_ASYNC_SENT;
> done:
> 	fcport->flags &= ~FCF_ASYNC_ACTIVE;
> +
> +	/*
> +	 * async login failed. Could be due to iocb/exchange resource
> +	 * being low. Set state DELETED for re-login process to start again.
> +	 */
> +	qla2x00_set_fcport_disc_state(fcport, DSC_DELETED);
> 	return rval;
> }
> 
> -- 
> 2.19.0.rc0
> 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index fd27fb511479..745fee298d56 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -390,6 +390,12 @@  qla2x00_async_login(struct scsi_qla_host *vha, fc_port_t *fcport,
 	fcport->flags &= ~FCF_ASYNC_SENT;
 done:
 	fcport->flags &= ~FCF_ASYNC_ACTIVE;
+
+	/*
+	 * async login failed. Could be due to iocb/exchange resource
+	 * being low. Set state DELETED for re-login process to start again.
+	 */
+	qla2x00_set_fcport_disc_state(fcport, DSC_DELETED);
 	return rval;
 }