remarkable-linux/drivers/target/loopback
Roland Dreier 6cf3fa6918 tcm_loop: Set residual field for SCSI commands
If the target core signals an over- or under-run, tcm_loop should call
scsi_set_resid() to tell the SCSI midlayer about the residual data length.

The difference can be seen by doing something like

    strace -eioctl sg_raw -r 1024 /dev/sda 8 0 0 0 1 0 > /dev/null

and looking at the "resid=" part of the SG_IO ioctl -- after this patch,
the field is correctly reported as 512.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-02-25 14:37:50 -08:00
..
Kconfig target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
Makefile [SCSI] tcm_loop: Add multi-fabric Linux/SCSI LLD fabric module 2011-03-23 13:10:33 -05:00
tcm_loop.c tcm_loop: Set residual field for SCSI commands 2012-02-25 14:37:50 -08:00
tcm_loop.h tcm_loop: defer all command submissions to workqueue 2012-02-25 14:37:48 -08:00