Skip to contentSkip to conversation

add DID_REQUEUE to the error handling

PATCH New James Bottomley 1 participant 1 message Apr 12, 2005 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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).

James

===== drivers/scsi/scsi_error.c 1.91 vs edited =====

drivers/scsi/scsi_error.c +3 -0
@@ -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)

===== include/scsi/scsi.h 1.28 vs edited =====

include/scsi/scsi.h +2 -0
@@ -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                           */
 
 /*