Commit 4cc930d9 authored by Naveen Burmi's avatar Naveen Burmi Committed by James Bottomley

[PATCH] New SCSI host_byte status code.

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.
parent 0671b4da
...@@ -1135,7 +1135,7 @@ void print_Scsi_Cmnd(struct scsi_cmnd *cmd) { ...@@ -1135,7 +1135,7 @@ void print_Scsi_Cmnd(struct scsi_cmnd *cmd) {
static const char * hostbyte_table[]={ static const char * hostbyte_table[]={
"DID_OK", "DID_NO_CONNECT", "DID_BUS_BUSY", "DID_TIME_OUT", "DID_BAD_TARGET", "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_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) void print_hostbyte(int scsiresult)
{ static int maxcode=0; { static int maxcode=0;
......
...@@ -1293,6 +1293,8 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) ...@@ -1293,6 +1293,8 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
*/ */
case DID_SOFT_ERROR: case DID_SOFT_ERROR:
goto maybe_retry; goto maybe_retry;
case DID_IMM_RETRY:
return NEEDS_RETRY;
case DID_ERROR: case DID_ERROR:
if (msg_byte(scmd->result) == COMMAND_COMPLETE && if (msg_byte(scmd->result) == COMMAND_COMPLETE &&
......
...@@ -280,6 +280,7 @@ struct scsi_lun { ...@@ -280,6 +280,7 @@ struct scsi_lun {
#define DID_BAD_INTR 0x09 /* Got an interrupt we weren't expecting. */ #define DID_BAD_INTR 0x09 /* Got an interrupt we weren't expecting. */
#define DID_PASSTHROUGH 0x0a /* Force command past mid-layer */ #define DID_PASSTHROUGH 0x0a /* Force command past mid-layer */
#define DID_SOFT_ERROR 0x0b /* The low level driver just wish a retry */ #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 */ #define DRIVER_OK 0x00 /* Driver status */
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment