tree 200694afba54d5b9cec984e52689943766eea119
parent 91bbfbda8d41f834c70c47d6f8c95245c90019e5
author <[EMAIL PROTECTED]> Wed, 13 Apr 2005 03:49:09 -0500
committer James Bottomley <[EMAIL PROTECTED]> Sun, 17 Apr 2005 06:16:08 -0500

scsi: add DID_REQUEUE to the error handling

We have a DID_IMM_RETRY to require a retry at once, but we could do with
a DID_REQUEUE to instruct the mid-layer to treat this command in the
same manner as QUEUE_FULL or BUSY (i.e. halt the submission until
another command returns ... or the queue pressure builds if there are no
outstanding commands).

Signed-off-by: James Bottomley <[EMAIL PROTECTED]>

 scsi/scsi_error.c |    3 +++
 scsi/scsi.h       |    2 ++
 2 files changed, 5 insertions(+)

Index: drivers/scsi/scsi_error.c
===================================================================
--- ae603f3613b47a0312034000d3e44276a6513d6d/drivers/scsi/scsi_error.c  
(mode:100644 sha1:13bac93fc3971260b5fd47f19cfd478285d35c31)
+++ 200694afba54d5b9cec984e52689943766eea119/drivers/scsi/scsi_error.c  
(mode:100644 sha1:203a0812508a1962c2c9d58020d3a6a9bc61aaf5)
@@ -1306,6 +1306,9 @@
        case DID_IMM_RETRY:
                return NEEDS_RETRY;
 
+       case DID_REQUEUE:
+               return ADD_TO_MLQUEUE;
+
        case DID_ERROR:
                if (msg_byte(scmd->result) == COMMAND_COMPLETE &&
                    status_byte(scmd->result) == RESERVATION_CONFLICT)
Index: include/scsi/scsi.h
===================================================================
--- ae603f3613b47a0312034000d3e44276a6513d6d/include/scsi/scsi.h  (mode:100644 
sha1:3507b3d7c0ebeed2fddc6bb8ac08e782d4063329)
+++ 200694afba54d5b9cec984e52689943766eea119/include/scsi/scsi.h  (mode:100644 
sha1:659ecf48fb4ac3777001cd71f887a5fbe569a6ec)
@@ -295,6 +295,8 @@
 #define DID_PASSTHROUGH 0x0a   /* Force command past mid-layer            */
 #define DID_SOFT_ERROR  0x0b   /* The low level driver just wish a retry  */
 #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 DRIVER_OK       0x00   /* Driver status                           */
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to