]> err.no Git - linux-2.6/blobdiff - drivers/scsi/scsi_error.c
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[linux-2.6] / drivers / scsi / scsi_error.c
index 6bac3d2668face7fd79cc0a011b4437d6f636e45..5d169a2881b98dd2accf752cc784551c7f598473 100644 (file)
@@ -1308,7 +1308,7 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
         * the request was not marked fast fail.  Note that above,
         * even if the request is marked fast fail, we still requeue
         * for queue congestion conditions (QUEUE_FULL or BUSY) */
-       if ((++scmd->retries) < scmd->allowed 
+       if ((++scmd->retries) <= scmd->allowed
            && !blk_noretry_request(scmd->request)) {
                return NEEDS_RETRY;
        } else {
@@ -1350,7 +1350,7 @@ static void scsi_eh_lock_door(struct scsi_device *sdev)
        cmnd[4] = SCSI_REMOVAL_PREVENT;
        cmnd[5] = 0;
 
-       scsi_execute_async(sdev, cmnd, DMA_NONE, NULL, 0, 0, 10 * HZ,
+       scsi_execute_async(sdev, cmnd, 6, DMA_NONE, NULL, 0, 0, 10 * HZ,
                           5, NULL, NULL, GFP_KERNEL);
 }
 
@@ -1433,7 +1433,7 @@ void scsi_eh_flush_done_q(struct list_head *done_q)
                list_del_init(&scmd->eh_entry);
                if (scsi_device_online(scmd->device) &&
                    !blk_noretry_request(scmd->request) &&
-                   (++scmd->retries < scmd->allowed)) {
+                   (++scmd->retries <= scmd->allowed)) {
                        SCSI_LOG_ERROR_RECOVERY(3, printk("%s: flush"
                                                          " retry cmd: %p\n",
                                                          current->comm,