android_kernel_samsung_msm8976/include/target
Roland Dreier be03ed7ca0 target: Report correct response length for some commands
commit 2426bd456a61407388b6e61fc5f98dbcbebc50e2 upstream.

When an initiator sends an allocation length bigger than what its
command consumes, the target should only return the actual response data
and set the residual length to the unused part of the allocation length.

Add a helper function that command handlers (INQUIRY, READ CAPACITY,
etc) can use to do this correctly, and use this code to get the correct
residual for commands that don't use the full initiator allocation in the
handlers for READ CAPACITY, READ CAPACITY(16), INQUIRY, MODE SENSE and
REPORT LUNS.

This addresses a handful of failures as reported by Christophe with
the Windows Certification Kit:

  http://permalink.gmane.org/gmane.linux.scsi.target.devel/6515

Signed-off-by: Roland Dreier <roland@purestorage.com>
Tested-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-30 20:09:45 -07:00
..
iscsi iscsi/iser-target: Fix isert_conn->state hung shutdown issues 2014-03-23 21:38:21 -07:00
configfs_macros.h
target_core_backend.h target: Report correct response length for some commands 2014-06-30 20:09:45 -07:00
target_core_base.h target/file: Update hw_max_sectors based on current block_size 2014-01-09 12:24:20 -08:00
target_core_configfs.h
target_core_fabric.h
target_core_fabric_configfs.h