public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] scsi: add DID_COND_REQUEUE SCSI ML host status
@ 2007-02-02 22:05 Edward Goggin
  0 siblings, 0 replies; only message in thread
From: Edward Goggin @ 2007-02-02 22:05 UTC (permalink / raw)
  To: linux-scsi; +Cc: James.Bottomley, eric.moore

From: Ed Goggin <egoggin@vmware.com>

Add new SCSI ML host status DID_COND_REQUEUE for ADD_TO_MLQUEUE
IFF not REQ_FAILFAST.

Signed-off-by: Ed Goggin <egoggin@vmware.com>

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 2dce06a..d8e884b 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1222,6 +1222,16 @@ int scsi_decide_disposition(struct scsi_
 	case DID_IMM_RETRY:
 		return NEEDS_RETRY;
 
+	case DID_COND_REQUEUE:
+		/*
+		 * Return immediately w/o requeue if the request 
+		 * indicates no retry.
+		 */
+		if (blk_noretry_request(scmd->request))
+			return SUCCESS;
+		else
+			return ADD_TO_MLQUEUE;
+
 	case DID_REQUEUE:
 		return ADD_TO_MLQUEUE;
 
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 5c0e979..0207f81 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -309,6 +309,8 @@ struct scsi_lun {
 #define DID_IMM_RETRY   0x0c	/* Retry without decrementing retry count
*/
 #define DID_REQUEUE	0x0d	/* Requeue command (no immediate retry) also
 				 * without decrementing the retry count	   */
+#define DID_COND_REQUEUE 0x0e	/* Requeue cmd w/o decr of retry count
IFF
+				 * not blk_noretry_request		   */
 #define DRIVER_OK       0x00	/* Driver status
*/
 
 /*

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-02 22:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-02 22:05 [PATCH 1/2] scsi: add DID_COND_REQUEUE SCSI ML host status Edward Goggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox