]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[SCSI] sd/scsi_lib simplify sd_rw_intr and scsi_io_completion
authorLuben Tuikov <ltuikov@yahoo.com>
Fri, 23 Jun 2006 16:39:09 +0000 (09:39 -0700)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Mon, 26 Jun 2006 15:00:20 +0000 (10:00 -0500)
commit03aba2f79594ca94d159c8bab454de9bcc385b76
tree5fcd23bfd01c80d356e7cab2f20854513db6b0f7
parentf89d0a4e1d01168f20f9e8273de7dfc094b2a430
[SCSI] sd/scsi_lib simplify sd_rw_intr and scsi_io_completion

This patch simplifies "good_bytes" computation in sd_rw_intr().
sd: "good_bytes" computation is always done in terms of the resolution
of the device's medium, since after that it is the number of good bytes
we pass around and other layers/contexts (as opposed ot sd) can translate
that to their own resolution (block layer:512).  It also makes
scsi_io_completion() processing more straightforward, eliminating the
3rd argument to the function.

It also fixes a couple of bugs like not checking return value,
using "break" instead of "return;", etc.

I've been running with this patch for some time now on a
test (do-it-all) system.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_lib.c
drivers/scsi/sd.c
drivers/scsi/sr.c
include/scsi/scsi_cmnd.h