diff options
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 7a1a1bb1341e..28a266c804be 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -932,10 +932,12 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd) | |||
932 | static unsigned char stu_command[6] = {START_STOP, 0, 0, 0, 1, 0}; | 932 | static unsigned char stu_command[6] = {START_STOP, 0, 0, 0, 1, 0}; |
933 | 933 | ||
934 | if (scmd->device->allow_restart) { | 934 | if (scmd->device->allow_restart) { |
935 | int rtn; | 935 | int i, rtn = NEEDS_RETRY; |
936 | |||
937 | for (i = 0; rtn == NEEDS_RETRY && i < 2; i++) | ||
938 | rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, | ||
939 | START_UNIT_TIMEOUT, 0); | ||
936 | 940 | ||
937 | rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, | ||
938 | START_UNIT_TIMEOUT, 0); | ||
939 | if (rtn == SUCCESS) | 941 | if (rtn == SUCCESS) |
940 | return 0; | 942 | return 0; |
941 | } | 943 | } |