linux/drivers/message/fusion
Tejun Heo 5f49f63178 block: set rq->resid_len to blk_rq_bytes() on issue
In commit c3a4d78c58, while introducing
rq->resid_len, the default value of residue count was changed from
full count to zero.  The conversion was done under the assumption that
when a request fails residue count wasn't defined.  However, Boaz and
James pointed out that this wasn't true and the residue count should
be preserved for failed requests too.

This patchset restores the original behavior by setting rq->resid_len
to blk_rq_bytes(rq) on request start and restoring explicit clearing
in affected drivers.  While at it, take advantage of the fact that
rq->resid_len is set to full count where applicable.

* ide-cd: rq->resid_len cleared on pc success

* mptsas: req->resid_len cleared on success

* sas_expander: rsp/req->resid_len cleared on success

* mpt2sas_transport: req->resid_len cleared on success

* ide-cd, ide-tape, mptsas, sas_host_smp, mpt2sas_transport, ub: take
  advantage of initial full count to simplify code

Boaz Harrosh spotted bug in resid_len initialization.  Fixed as
suggested.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Borislav Petkov <petkovbb@googlemail.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-05-19 11:36:08 +02:00
..
lsi [SCSI] mpt fusion: Update MPI Headers to version 01.05.19 2009-01-13 10:36:01 -06:00
Kconfig [SCSI] mpt fusion: Kconfig cleanup 2007-10-12 14:48:53 -04:00
Makefile [SCSI] mpt fusion: logging support in Kconfig, Makefile, mptbase.h and addition of mptdebug.h 2007-07-28 11:25:35 -04:00
mptbase.c scsi: mpt: suppress debugobjects warning 2009-04-21 13:41:50 -07:00
mptbase.h [SCSI] mpt fusion: Add Firmware debug support 2009-01-13 10:36:02 -06:00
mptctl.c [SCSI] fusion: Move a dereference below a NULL test 2009-01-02 12:11:15 -06:00
mptctl.h [SCSI] mpt fusion : Updated copyright statment with 2008 included 2008-06-05 09:27:17 -05:00
mptdebug.h [SCSI] mpt fusion : Updated copyright statment with 2008 included 2008-06-05 09:27:17 -05:00
mptfc.c [SCSI] replace __FUNCTION__ with __func__ 2008-07-27 10:31:49 -04:00
mptlan.c fusion: convert devices to new API 2009-01-07 18:04:45 -08:00
mptlan.h mptlan: Kill directly reference of netdev->priv 2008-12-03 21:13:37 -08:00
mptsas.c block: set rq->resid_len to blk_rq_bytes() on issue 2009-05-19 11:36:08 +02:00
mptsas.h [SCSI] mpt fusion : Updated copyright statment with 2008 included 2008-06-05 09:27:17 -05:00
mptscsih.c [SCSI] mpt fusion: Add Firmware debug support 2009-01-13 10:36:02 -06:00
mptscsih.h [SCSI] mpt fusion : Updated copyright statment with 2008 included 2008-06-05 09:27:17 -05:00
mptspi.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-07-15 18:58:04 -07:00