summaryrefslogtreecommitdiff
path: root/include/target/target_core_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/target/target_core_base.h')
-rw-r--r--include/target/target_core_base.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 35aa786f93da..7f5fed3c89e1 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -89,7 +89,6 @@ enum transport_state_table {
TRANSPORT_PROCESS_TMR = 9,
TRANSPORT_ISTATE_PROCESSING = 11,
TRANSPORT_NEW_CMD_MAP = 16,
- TRANSPORT_FREE_CMD_INTR = 17,
TRANSPORT_COMPLETE_QF_WP = 18,
TRANSPORT_COMPLETE_QF_OK = 19,
};
@@ -115,7 +114,6 @@ enum se_cmd_flags_table {
SCF_DELAYED_CMD_FROM_SAM_ATTR = 0x00080000,
SCF_UNUSED = 0x00100000,
SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC = 0x00400000,
- SCF_EMULATE_CDB_ASYNC = 0x01000000,
};
/* struct se_dev_entry->lun_flags and struct se_lun->lun_access */
@@ -426,6 +424,9 @@ struct se_cmd {
enum transport_state_table t_state;
/* Transport specific error status */
int transport_error_status;
+ /* Used to signal cmd->se_tfo->check_release_cmd() usage per cmd */
+ int check_release:1;
+ int cmd_wait_set:1;
/* See se_cmd_flags_table */
u32 se_cmd_flags;
u32 se_ordered_id;
@@ -452,8 +453,10 @@ struct se_cmd {
struct se_session *se_sess;
struct se_tmr_req *se_tmr_req;
struct list_head se_queue_node;
+ struct list_head se_cmd_list;
+ struct completion cmd_wait_comp;
struct target_core_fabric_ops *se_tfo;
- int (*transport_emulate_cdb)(struct se_cmd *);
+ int (*execute_task)(struct se_task *);
void (*transport_complete_callback)(struct se_cmd *);
unsigned char *t_task_cdb;
@@ -559,12 +562,16 @@ struct se_node_acl {
} ____cacheline_aligned;
struct se_session {
+ int sess_tearing_down:1;
u64 sess_bin_isid;
struct se_node_acl *se_node_acl;
struct se_portal_group *se_tpg;
void *fabric_sess_ptr;
struct list_head sess_list;
struct list_head sess_acl_list;
+ struct list_head sess_cmd_list;
+ struct list_head sess_wait_list;
+ spinlock_t sess_cmd_lock;
} ____cacheline_aligned;
struct se_device;