[v2,01/11] qla2xxx: flush all sessions on zone disable
diff mbox series

Message ID 20200806111014.28434-2-njavali@marvell.com
State Accepted
Headers show
Series
  • qla2xxx driver bug fixes
Related show

Commit Message

Nilesh Javali Aug. 6, 2020, 11:10 a.m. UTC
From: Quinn Tran <qutran@marvell.com>

On Zone Disable, certain switch would ignore all
commands. This cause timeout for both switch
scan command and abort of that command. On detection
of this condition, all sessions will be shutdown.

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

Comments

Himanshu Madhani Aug. 12, 2020, 7:38 p.m. UTC | #1
> On Aug 6, 2020, at 6:10 AM, Nilesh Javali <njavali@marvell.com> wrote:
> 
> From: Quinn Tran <qutran@marvell.com>
> 
> On Zone Disable, certain switch would ignore all
> commands. This cause timeout for both switch
> scan command and abort of that command. On detection
> of this condition, all sessions will be shutdown.
> 
> Signed-off-by: Quinn Tran <qutran@marvell.com>
> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> ---
> drivers/scsi/qla2xxx/qla_gs.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
> index 42c3ad27f1cb..c5529da1df59 100644
> --- a/drivers/scsi/qla2xxx/qla_gs.c
> +++ b/drivers/scsi/qla2xxx/qla_gs.c
> @@ -3734,6 +3734,18 @@ static void qla2x00_async_gpnft_gnnft_sp_done(srb_t *sp, int res)
> 		unsigned long flags;
> 		const char *name = sp->name;
> 
> +		if (res == QLA_OS_TIMER_EXPIRED) {
> +			/* switch is ignoring all commands.
> +			 * This might be a zone disable behavior.
> +			 * This means we hit 64s timeout.
> +			 * 22s GPNFT + 44s Abort = 64s
> +			 */
> +			ql_dbg(ql_dbg_disc, vha, 0xffff,
> +			       "%s: Switch Zone check please .\n",
> +			       name);
> +			qla2x00_mark_all_devices_lost(vha);
> +		}
> +
> 		/*
> 		 * We are in an Interrupt context, queue up this
> 		 * sp for GNNFT_DONE work. This will allow all
> -- 
> 2.19.0.rc0
> 


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

--
Himanshu Madhani	 Oracle Linux Engineering

Patch
diff mbox series

diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index 42c3ad27f1cb..c5529da1df59 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -3734,6 +3734,18 @@  static void qla2x00_async_gpnft_gnnft_sp_done(srb_t *sp, int res)
 		unsigned long flags;
 		const char *name = sp->name;
 
+		if (res == QLA_OS_TIMER_EXPIRED) {
+			/* switch is ignoring all commands.
+			 * This might be a zone disable behavior.
+			 * This means we hit 64s timeout.
+			 * 22s GPNFT + 44s Abort = 64s
+			 */
+			ql_dbg(ql_dbg_disc, vha, 0xffff,
+			       "%s: Switch Zone check please .\n",
+			       name);
+			qla2x00_mark_all_devices_lost(vha);
+		}
+
 		/*
 		 * We are in an Interrupt context, queue up this
 		 * sp for GNNFT_DONE work. This will allow all