linux_old1/drivers/scsi/libsas
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
..
Kconfig [SCSI] libsas: add host SMP processing 2008-01-11 18:29:11 -06:00
Makefile [SCSI] libsas: abstract STP task status into a function 2008-01-25 11:47:23 -06:00
sas_ata.c Merge branch 'for-2.6.28' of git://git.kernel.dk/linux-2.6-block 2008-10-10 10:52:45 -07:00
sas_discover.c [SCSI] struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-02 10:22:16 -06:00
sas_dump.c [SCSI] struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-02 10:22:16 -06:00
sas_dump.h
sas_event.c [SCSI] libsas: Add SAS_HA state flags to avoid queueing events while unloading 2007-01-13 16:21:53 -06:00
sas_expander.c block: set rq->resid_len to blk_rq_bytes() on issue 2009-05-19 11:36:08 +02:00
sas_host_smp.c block: set rq->resid_len to blk_rq_bytes() on issue 2009-05-19 11:36:08 +02:00
sas_init.c Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2007-07-22 11:36:49 -07:00
sas_internal.h block: unify request timeout handling 2008-10-09 08:56:13 +02:00
sas_phy.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
sas_port.c [SCSI] struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-02 10:22:16 -06:00
sas_scsi_host.c [libata] get-identity ioctl: Fix use of invalid memory pointer 2009-01-16 10:17:09 -05:00
sas_task.c [SCSI] libsas: abstract STP task status into a function 2008-01-25 11:47:23 -06:00