diff options
-rw-r--r-- | drivers/scsi/scsi_error.c | 4 | ||||
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 5cc97b721661..ff82ccfbb106 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -1308,7 +1308,7 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) | |||
1308 | * the request was not marked fast fail. Note that above, | 1308 | * the request was not marked fast fail. Note that above, |
1309 | * even if the request is marked fast fail, we still requeue | 1309 | * even if the request is marked fast fail, we still requeue |
1310 | * for queue congestion conditions (QUEUE_FULL or BUSY) */ | 1310 | * for queue congestion conditions (QUEUE_FULL or BUSY) */ |
1311 | if ((++scmd->retries) < scmd->allowed | 1311 | if ((++scmd->retries) <= scmd->allowed |
1312 | && !blk_noretry_request(scmd->request)) { | 1312 | && !blk_noretry_request(scmd->request)) { |
1313 | return NEEDS_RETRY; | 1313 | return NEEDS_RETRY; |
1314 | } else { | 1314 | } else { |
@@ -1433,7 +1433,7 @@ static void scsi_eh_flush_done_q(struct list_head *done_q) | |||
1433 | list_del_init(&scmd->eh_entry); | 1433 | list_del_init(&scmd->eh_entry); |
1434 | if (scsi_device_online(scmd->device) && | 1434 | if (scsi_device_online(scmd->device) && |
1435 | !blk_noretry_request(scmd->request) && | 1435 | !blk_noretry_request(scmd->request) && |
1436 | (++scmd->retries < scmd->allowed)) { | 1436 | (++scmd->retries <= scmd->allowed)) { |
1437 | SCSI_LOG_ERROR_RECOVERY(3, printk("%s: flush" | 1437 | SCSI_LOG_ERROR_RECOVERY(3, printk("%s: flush" |
1438 | " retry cmd: %p\n", | 1438 | " retry cmd: %p\n", |
1439 | current->comm, | 1439 | current->comm, |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 4362dcde74af..701a328f7beb 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -1498,7 +1498,7 @@ static void scsi_kill_request(struct request *req, request_queue_t *q) | |||
1498 | static void scsi_softirq_done(struct request *rq) | 1498 | static void scsi_softirq_done(struct request *rq) |
1499 | { | 1499 | { |
1500 | struct scsi_cmnd *cmd = rq->completion_data; | 1500 | struct scsi_cmnd *cmd = rq->completion_data; |
1501 | unsigned long wait_for = cmd->allowed * cmd->timeout_per_command; | 1501 | unsigned long wait_for = (cmd->allowed + 1) * cmd->timeout_per_command; |
1502 | int disposition; | 1502 | int disposition; |
1503 | 1503 | ||
1504 | INIT_LIST_HEAD(&cmd->eh_entry); | 1504 | INIT_LIST_HEAD(&cmd->eh_entry); |