All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: aacraid: fix io drop during the reset
@ 2017-12-12 19:40 Prasad B Munirathnam
  2017-12-13 21:23 ` Raghava Aditya Renukunta
  2017-12-15  3:34 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Prasad B Munirathnam @ 2017-12-12 19:40 UTC (permalink / raw)
  To: prasad.munirathnam, david.carroll, raghavaaditya.renukunta,
	martin.petersen, james.bottomley
  Cc: linux-scsi

"FIB_CONTEXT_FLAG_TIMEDOUT" flag is set in aac_eh_abort to
indicate command timeout, using the same flag in reset handler
causes the command to timeout and the IO's were droped.

defined a new flag "FIB_CONTEXT_FLAG_EH_RESET" to make sure IO
is properly handled in eh_reset handler.

Signed-off-by: Prasad B Munirathnam <prasad.munirathnam@microsemi.com>
---
 drivers/scsi/aacraid/aacraid.h | 1 +
 drivers/scsi/aacraid/linit.c   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 403a639..b0b290f 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -1724,6 +1724,7 @@ struct aac_dev
 #define FIB_CONTEXT_FLAG_NATIVE_HBA		(0x00000010)
 #define FIB_CONTEXT_FLAG_NATIVE_HBA_TMF	(0x00000020)
 #define FIB_CONTEXT_FLAG_SCSI_CMD	(0x00000040)
+#define FIB_CONTEXT_FLAG_EH_RESET	(0x00000080)
 
 /*
  *	Define the command values
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 3677bef..03af5bd 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -1034,7 +1034,7 @@ static int aac_eh_bus_reset(struct scsi_cmnd* cmd)
 			info = &aac->hba_map[bus][cid];
 			if (bus >= AAC_MAX_BUSES || cid >= AAC_MAX_TARGETS ||
 			    info->devtype != AAC_DEVTYPE_NATIVE_RAW) {
-				fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT;
+				fib->flags |= FIB_CONTEXT_FLAG_EH_RESET;
 				cmd->SCp.phase = AAC_OWNER_ERROR_HANDLER;
 			}
 		}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] scsi: aacraid: fix io drop during the reset
  2017-12-12 19:40 [PATCH] scsi: aacraid: fix io drop during the reset Prasad B Munirathnam
@ 2017-12-13 21:23 ` Raghava Aditya Renukunta
  2017-12-15  3:34 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Raghava Aditya Renukunta @ 2017-12-13 21:23 UTC (permalink / raw)
  To: Prasad Munirathnam; +Cc: linux-scsi



> -----Original Message-----
> From: Prasad B Munirathnam [mailto:prasad.munirathnam@microsemi.com]
> Sent: Tuesday, December 12, 2017 11:40 AM
> To: Prasad Munirathnam <Prasad.Munirathnam@microsemi.com>; Dave
> Carroll <david.carroll@microsemi.com>; Raghava Aditya Renukunta
> <RaghavaAditya.Renukunta@microsemi.com>;
> martin.petersen@oracle.com; james.bottomley@hansenpartnership.com
> Cc: linux-scsi@vger.kernel.org
> Subject: [PATCH] scsi: aacraid: fix io drop during the reset
> 
> "FIB_CONTEXT_FLAG_TIMEDOUT" flag is set in aac_eh_abort to
> indicate command timeout, using the same flag in reset handler
> causes the command to timeout and the IO's were droped.
> 
> defined a new flag "FIB_CONTEXT_FLAG_EH_RESET" to make sure IO
> is properly handled in eh_reset handler.
> 
> Signed-off-by: Prasad B Munirathnam
> <prasad.munirathnam@microsemi.com>
> ---
Reviewed-by :Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: aacraid: fix io drop during the reset
  2017-12-12 19:40 [PATCH] scsi: aacraid: fix io drop during the reset Prasad B Munirathnam
  2017-12-13 21:23 ` Raghava Aditya Renukunta
@ 2017-12-15  3:34 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-12-15  3:34 UTC (permalink / raw)
  To: Prasad B Munirathnam
  Cc: david.carroll, raghavaaditya.renukunta, martin.petersen,
	james.bottomley, linux-scsi


Prasad,

> "FIB_CONTEXT_FLAG_TIMEDOUT" flag is set in aac_eh_abort to
> indicate command timeout, using the same flag in reset handler
> causes the command to timeout and the IO's were droped.

Applied to 4.15/scsi-fixes. Thank you!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-15  3:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-12 19:40 [PATCH] scsi: aacraid: fix io drop during the reset Prasad B Munirathnam
2017-12-13 21:23 ` Raghava Aditya Renukunta
2017-12-15  3:34 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.