Skip to content

Commit 39d2274

Browse files
Quinn Tranmartinkpetersen
authored andcommitted
scsi: qla2xxx: Fix session hang in gnl
Connection does not resume after a host reset / chip reset. The cause of the blockage is due to the FCF_ASYNC_ACTIVE left on. The gnl command was interrupted by the chip reset. On exiting the command, this flag should be turn off to allow relogin to reoccur. Clear this flag to prevent blockage. Cc: stable@vger.kernel.org Fixes: 17e6464 ("scsi: qla2xxx: Correct fcport flags handling") Signed-off-by: Quinn Tran <qutran@marvell.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Link: https://lore.kernel.org/r/20230714070104.40052-7-njavali@marvell.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 5b51f35 commit 39d2274

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ int qla24xx_async_gnl(struct scsi_qla_host *vha, fc_port_t *fcport)
11411141
u16 *mb;
11421142

11431143
if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT))
1144-
return rval;
1144+
goto done;
11451145

11461146
ql_dbg(ql_dbg_disc, vha, 0x20d9,
11471147
"Async-gnlist WWPN %8phC \n", fcport->port_name);
@@ -1195,8 +1195,9 @@ int qla24xx_async_gnl(struct scsi_qla_host *vha, fc_port_t *fcport)
11951195
done_free_sp:
11961196
/* ref: INIT */
11971197
kref_put(&sp->cmd_kref, qla2x00_sp_release);
1198+
fcport->flags &= ~(FCF_ASYNC_SENT);
11981199
done:
1199-
fcport->flags &= ~(FCF_ASYNC_ACTIVE | FCF_ASYNC_SENT);
1200+
fcport->flags &= ~(FCF_ASYNC_ACTIVE);
12001201
return rval;
12011202
}
12021203

0 commit comments

Comments
 (0)