odroid-linux/drivers/target/loopback
Roland Dreier bbcf567a1c tcm_loop: Set residual field for SCSI commands
commit 6cf3fa6918 upstream.

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>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-02 09:27:11 -07:00
..
Kconfig
Makefile
tcm_loop.c tcm_loop: Set residual field for SCSI commands 2012-04-02 09:27:11 -07:00
tcm_loop.h