Lines Matching refs:se_cmd

47 transport_lookup_cmd_lun(struct se_cmd *se_cmd)  in transport_lookup_cmd_lun()  argument
50 struct se_session *se_sess = se_cmd->se_sess; in transport_lookup_cmd_lun()
56 deve = target_nacl_find_deve(nacl, se_cmd->orig_fe_lun); in transport_lookup_cmd_lun()
60 if (se_cmd->data_direction == DMA_TO_DEVICE) in transport_lookup_cmd_lun()
62 se_cmd->data_length); in transport_lookup_cmd_lun()
63 else if (se_cmd->data_direction == DMA_FROM_DEVICE) in transport_lookup_cmd_lun()
65 se_cmd->data_length); in transport_lookup_cmd_lun()
67 if ((se_cmd->data_direction == DMA_TO_DEVICE) && in transport_lookup_cmd_lun()
71 se_cmd->se_tfo->fabric_name, in transport_lookup_cmd_lun()
72 se_cmd->orig_fe_lun); in transport_lookup_cmd_lun()
84 se_cmd->se_lun = se_lun; in transport_lookup_cmd_lun()
85 se_cmd->pr_res_key = deve->pr_res_key; in transport_lookup_cmd_lun()
86 se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD; in transport_lookup_cmd_lun()
87 se_cmd->lun_ref_active = true; in transport_lookup_cmd_lun()
98 if (se_cmd->orig_fe_lun != 0) { in transport_lookup_cmd_lun()
101 se_cmd->se_tfo->fabric_name, in transport_lookup_cmd_lun()
102 se_cmd->orig_fe_lun, in transport_lookup_cmd_lun()
110 if ((se_cmd->data_direction != DMA_FROM_DEVICE) && in transport_lookup_cmd_lun()
111 (se_cmd->data_direction != DMA_NONE)) in transport_lookup_cmd_lun()
118 se_cmd->se_lun = se_sess->se_tpg->tpg_virt_lun0; in transport_lookup_cmd_lun()
119 se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD; in transport_lookup_cmd_lun()
120 se_cmd->lun_ref_active = true; in transport_lookup_cmd_lun()
128 se_cmd->se_dev = rcu_dereference_raw(se_lun->lun_se_dev); in transport_lookup_cmd_lun()
129 this_cpu_inc(se_cmd->se_dev->stats->total_cmds); in transport_lookup_cmd_lun()
131 if (se_cmd->data_direction == DMA_TO_DEVICE) in transport_lookup_cmd_lun()
132 this_cpu_add(se_cmd->se_dev->stats->write_bytes, in transport_lookup_cmd_lun()
133 se_cmd->data_length); in transport_lookup_cmd_lun()
134 else if (se_cmd->data_direction == DMA_FROM_DEVICE) in transport_lookup_cmd_lun()
135 this_cpu_add(se_cmd->se_dev->stats->read_bytes, in transport_lookup_cmd_lun()
136 se_cmd->data_length); in transport_lookup_cmd_lun()
142 int transport_lookup_tmr_lun(struct se_cmd *se_cmd) in transport_lookup_tmr_lun() argument
146 struct se_session *se_sess = se_cmd->se_sess; in transport_lookup_tmr_lun()
148 struct se_tmr_req *se_tmr = se_cmd->se_tmr_req; in transport_lookup_tmr_lun()
151 deve = target_nacl_find_deve(nacl, se_cmd->orig_fe_lun); in transport_lookup_tmr_lun()
160 se_cmd->se_lun = se_lun; in transport_lookup_tmr_lun()
161 se_cmd->pr_res_key = deve->pr_res_key; in transport_lookup_tmr_lun()
162 se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD; in transport_lookup_tmr_lun()
163 se_cmd->lun_ref_active = true; in transport_lookup_tmr_lun()
171 se_cmd->se_tfo->fabric_name, in transport_lookup_tmr_lun()
172 se_cmd->orig_fe_lun, in transport_lookup_tmr_lun()
176 se_cmd->se_dev = rcu_dereference_raw(se_lun->lun_se_dev); in transport_lookup_tmr_lun()
183 bool target_lun_is_rdonly(struct se_cmd *cmd) in target_lun_is_rdonly()
1109 passthrough_parse_cdb(struct se_cmd *cmd, in passthrough_parse_cdb()
1110 sense_reason_t (*exec_cmd)(struct se_cmd *cmd)) in passthrough_parse_cdb()