diff mbox series

[03/16] qla2xxx: fix stuck session in gpdb

Message ID 20211224070712.17905-4-njavali@marvell.com
State Superseded
Headers show
Series qla2xxx misc bug fixes and features | expand

Commit Message

Nilesh Javali Dec. 24, 2021, 7:06 a.m. UTC
From: Quinn Tran <qutran@marvell.com>

Fix stuck sessions in get port database. When a thread is in the process
of re-establishing a session, a flag is set to prevent multiple threads /
triggers from doing the same task. This flag was left on, where any attempt to
relogin was locked out. Clear this flag, if the attempt has failed.

Cc: stable@vger.kernel.org
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, 3 insertions(+), 3 deletions(-)

Comments

Himanshu Madhani Jan. 3, 2022, 12:34 a.m. UTC | #1
> On Dec 23, 2021, at 11:06 PM, Nilesh Javali <njavali@marvell.com> wrote:
> 
> From: Quinn Tran <qutran@marvell.com>
> 
> Fix stuck sessions in get port database. When a thread is in the process
> of re-establishing a session, a flag is set to prevent multiple threads /
> triggers from doing the same task. This flag was left on, where any attempt to
> relogin was locked out. Clear this flag, if the attempt has failed.
> 
> Cc: stable@vger.kernel.org
> 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, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
> index 38c11b75f644..0b641a803f7c 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -1332,9 +1332,9 @@ int qla24xx_async_gpdb(struct scsi_qla_host *vha, fc_port_t *fcport, u8 opt)
> 	if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT) ||
> 	    fcport->loop_id == FC_NO_LOOP_ID) {
> 		ql_log(ql_log_warn, vha, 0xffff,
> -		    "%s: %8phC - not sending command.\n",
> -		    __func__, fcport->port_name);
> -		return rval;
> +		    "%s: %8phC online %d flags %x - not sending command.\n",
> +		    __func__, fcport->port_name, vha->flags.online, fcport->flags);
> +		goto done;
> 	}
> 
> 	sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
> -- 
> 2.23.1
> 

Looks Good. 

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

--
Himanshu Madhani	 Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 38c11b75f644..0b641a803f7c 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1332,9 +1332,9 @@  int qla24xx_async_gpdb(struct scsi_qla_host *vha, fc_port_t *fcport, u8 opt)
 	if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT) ||
 	    fcport->loop_id == FC_NO_LOOP_ID) {
 		ql_log(ql_log_warn, vha, 0xffff,
-		    "%s: %8phC - not sending command.\n",
-		    __func__, fcport->port_name);
-		return rval;
+		    "%s: %8phC online %d flags %x - not sending command.\n",
+		    __func__, fcport->port_name, vha->flags.online, fcport->flags);
+		goto done;
 	}
 
 	sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);