Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31938
b: refs/heads/master
c: d6b0c53
h: refs/heads/master
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Jul 2, 2006
1 parent b6d27f4 commit 1013aad
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f58f8313a6f552d1e7889926a29f0cf91c02f55d
refs/heads/master: d6b0c53723753fc0cfda63f56735b225c43e1e9a
30 changes: 14 additions & 16 deletions trunk/drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,22 +920,20 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
* Next deal with any sectors which we were able to correctly
* handle.
*/
if (good_bytes > 0) {
SCSI_LOG_HLCOMPLETE(1, printk("%ld sectors total, "
"%d bytes done.\n",
req->nr_sectors, good_bytes));
SCSI_LOG_HLCOMPLETE(1, printk("use_sg is %d\n", cmd->use_sg));

if (clear_errors)
req->errors = 0;

/* A number of bytes were successfully read. If there
* is leftovers and there is some kind of error
* (result != 0), retry the rest.
*/
if (scsi_end_request(cmd, 1, good_bytes, !!result) == NULL)
return;
}
SCSI_LOG_HLCOMPLETE(1, printk("%ld sectors total, "
"%d bytes done.\n",
req->nr_sectors, good_bytes));
SCSI_LOG_HLCOMPLETE(1, printk("use_sg is %d\n", cmd->use_sg));

if (clear_errors)
req->errors = 0;

/* A number of bytes were successfully read. If there
* are leftovers and there is some kind of error
* (result != 0), retry the rest.
*/
if (scsi_end_request(cmd, 1, good_bytes, result == 0) == NULL)
return;

/* good_bytes = 0, or (inclusive) there were leftovers and
* result = 0, so scsi_end_request couldn't retry.
Expand Down

0 comments on commit 1013aad

Please sign in to comment.