From b0d7994660af1601cc26ef7ab748569fdb9c253b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 10 Jan 2012 14:16:59 +0100 Subject: target: add unknown size flag to target_submit_cmd() The UASP protocol does not inform the target device upfront how much data it should expect so we have to learn in from the CDB. So in order to handle this case, add a TARGET_SCF_UNKNOWN_SIZE to target_submit_cmd() and perform an explictly assignment for se_cmd->data_length from the extracted CDB size in transport_generic_cmd_sequencer(). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/target/target_core_base.h') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index edb51f6544f8..6a02c99d54a5 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -233,6 +233,7 @@ enum tcm_sense_reason_table { enum target_sc_flags_table { TARGET_SCF_BIDI_OP = 0x01, TARGET_SCF_ACK_KREF = 0x02, + TARGET_SCF_UNKNOWN_SIZE = 0x04, }; /* fabric independent task management function values */ @@ -537,6 +538,7 @@ struct se_cmd { /* Used to signal cmd->se_tfo->check_release_cmd() usage per cmd */ unsigned check_release:1; unsigned cmd_wait_set:1; + unsigned unknown_data_length:1; /* See se_cmd_flags_table */ u32 se_cmd_flags; u32 se_ordered_id; -- cgit v1.2.3-59-g8ed1b