Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101493
b: refs/heads/master
c: 427e59f
h: refs/heads/master
i:
  101491: 6e0dfe6
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Jun 5, 2008
1 parent bc010c4 commit fc9a6a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19c4158bcdf42ee3b2394342caf14f8471d2c78e
refs/heads/master: 427e59f09fdba387547106de7bab980b7fff77be
9 changes: 9 additions & 0 deletions trunk/drivers/scsi/scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,9 +855,18 @@ void scsi_finish_command(struct scsi_cmnd *cmd)

good_bytes = scsi_bufflen(cmd);
if (cmd->request->cmd_type != REQ_TYPE_BLOCK_PC) {
int old_good_bytes = good_bytes;
drv = scsi_cmd_to_driver(cmd);
if (drv->done)
good_bytes = drv->done(cmd);
/*
* USB may not give sense identifying bad sector and
* simply return a residue instead, so subtract off the
* residue if drv->done() error processing indicates no
* change to the completion length.
*/
if (good_bytes == old_good_bytes)
good_bytes -= scsi_get_resid(cmd);
}
scsi_io_completion(cmd, good_bytes);
}
Expand Down

0 comments on commit fc9a6a8

Please sign in to comment.