linux/include/target
Roland Dreier 2426bd456a target: Report correct response length for some commands
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>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2014-06-11 12:15:30 -07:00
..
iscsi Target/iscsi: Fix sendtargets response pdu for iser transport 2014-06-11 11:52:39 -07:00
configfs_macros.h doc: fix broken references 2011-09-27 18:08:04 +02:00
target_core_backend.h target: Report correct response length for some commands 2014-06-11 12:15:30 -07:00
target_core_base.h target: Pass in transport supported PI at session initialization 2014-04-07 01:48:54 -07:00
target_core_configfs.h target: Remove TF_CIT_TMPL macro 2013-10-16 13:35:02 -07:00
target_core_fabric.h target: Pass in transport supported PI at session initialization 2014-04-07 01:48:54 -07:00
target_core_fabric_configfs.h target: Add se_portal_group->tpg_auth_group 2013-07-03 19:44:31 -07:00