[SCSI] Return NEEDS_RETRY for eh commands with status BUSY
authorHannes Reinecke <hare@suse.de>
Thu, 29 Jul 2010 08:10:16 +0000 (10:10 +0200)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 11 Aug 2010 04:51:20 +0000 (00:51 -0400)
When the transport is busy and we're sending an EH command drivers
occasionally return 'BUSY'. As this in most cases is the TUR
command sent as part of the error recovery this is a sure way
to make the error recovery escalate. Returning 'NEEDS_RETRY'
here will just retry the TUR command and eventually abort the
original command, thus making error handling far smoother.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/scsi_error.c

index 2bf9846..cfd01ef 100644 (file)
@@ -481,6 +481,7 @@ static int scsi_eh_completed_normally(struct scsi_cmnd *scmd)
                scsi_handle_queue_full(scmd->device);
                /* fall through */
        case BUSY:
+               return NEEDS_RETRY;
        default:
                return FAILED;
        }