scsi: add DID_REQUEUE to the error handling
author <jejb@titanic.il.steeleye.com> <>
Tue, 12 Apr 2005 22:49:09 +0000 (17:49 -0500)
committerJames Bottomley <jejb@titanic>
Sun, 17 Apr 2005 01:16:08 +0000 (20:16 -0500)
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 <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_error.c
include/scsi/scsi.h

index 13bac93fc3971260b5fd47f19cfd478285d35c31..203a0812508a1962c2c9d58020d3a6a9bc61aaf5 100644 (file)
@@ -1306,6 +1306,9 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
        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 3507b3d7c0ebeed2fddc6bb8ac08e782d4063329..659ecf48fb4ac3777001cd71f887a5fbe569a6ec 100644 (file)
@@ -295,6 +295,8 @@ struct scsi_lun {
 #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                           */
 
 /*