diff options
author | Brian King <brking@us.ibm.com> | 2006-02-25 00:10:04 +0100 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-02-28 04:38:39 +0100 |
commit | 8884efab1516613215816d48132dd724508970bf (patch) | |
tree | 613b80a6adea59defeed3a1fa9fdc6dde7313a28 /drivers/scsi/scsi_lib.c | |
parent | [SCSI] megaraid_sas: fix physical disk handling (diff) | |
download | linux-8884efab1516613215816d48132dd724508970bf.tar.xz linux-8884efab1516613215816d48132dd724508970bf.zip |
[SCSI] scsi: scsi command retries off by one fix
Fix up an off by one error in calculating retries for scsi
commands. This bug was discovered when an SG_IO request
was sent to scsi core with retries = 0, causing the overall
timeout check to go off in scsi_softirq_done.
Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) static void scsi_softirq_done(struct request *rq) { struct scsi_cmnd *cmd = rq->completion_data; - unsigned long wait_for = cmd->allowed * cmd->timeout_per_command; + unsigned long wait_for = (cmd->allowed + 1) * cmd->timeout_per_command; int disposition; INIT_LIST_HEAD(&cmd->eh_entry); |