Skip to contentSkip to conversation

New SCSI host_byte status code.

PATCH Naveen Burmi 1 participant 1 message Mar 9, 2004 SCSI

lore
Share & tools
lore
#0 lore raw

At present there is no way to retry, if allowed, a scsi command without decrementing the scsi command's retry count.

Please find a patch attached, which is submitted, for adding a new host_byte status code called "DID_IMM_RETRY". This enables the Low Level SCSI drivers to initiate retry of a scsi command without decrementing the scsi commad's retry count.

Thanks,
Naveen.

drivers/scsi/constants.c +1 -1
diff -Nuar linux-2.6.3/drivers/scsi/constants.c linux-2.6.3.new/drivers/scsi/constants.c
@@ -1135,7 +1135,7 @@
 static const char * hostbyte_table[]={
 "DID_OK", "DID_NO_CONNECT", "DID_BUS_BUSY", "DID_TIME_OUT", "DID_BAD_TARGET", 
 "DID_ABORT", "DID_PARITY", "DID_ERROR", "DID_RESET", "DID_BAD_INTR",
-"DID_PASSTHROUGH", "DID_SOFT_ERROR", NULL};
+"DID_PASSTHROUGH", "DID_SOFT_ERROR", "DID_IMM_RETRY", NULL};
 
 void print_hostbyte(int scsiresult)
 {   static int maxcode=0;
drivers/scsi/scsi_error.c +2 -0
diff -Nuar linux-2.6.3/drivers/scsi/scsi_error.c linux-2.6.3.new/drivers/scsi/scsi_error.c
@@ -1181,6 +1181,8 @@
 		 */
 	case DID_SOFT_ERROR:
 		goto maybe_retry;
+	case DID_IMM_RETRY:
+		return NEEDS_RETRY;
 
 	case DID_ERROR:
 		if (msg_byte(scmd->result) == COMMAND_COMPLETE &&
include/scsi/scsi.h +1 -0
diff -Nuar linux-2.6.3/include/scsi/scsi.h linux-2.6.3.new/include/scsi/scsi.h
@@ -266,6 +266,7 @@
 #define DID_BAD_INTR    0x09	/* Got an interrupt we weren't expecting.  */
 #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 DRIVER_OK       0x00	/* Driver status                           */
 
 /*