Lines Matching refs:se_cmd
59 transport_lookup_cmd_lun(struct se_cmd *se_cmd, u64 unpacked_lun) in transport_lookup_cmd_lun() argument
62 struct se_session *se_sess = se_cmd->se_sess; in transport_lookup_cmd_lun()
72 if (se_cmd->data_direction == DMA_TO_DEVICE) in transport_lookup_cmd_lun()
73 atomic_long_add(se_cmd->data_length, in transport_lookup_cmd_lun()
75 else if (se_cmd->data_direction == DMA_FROM_DEVICE) in transport_lookup_cmd_lun()
76 atomic_long_add(se_cmd->data_length, in transport_lookup_cmd_lun()
86 se_cmd->se_lun = rcu_dereference(deve->se_lun); in transport_lookup_cmd_lun()
87 se_cmd->pr_res_key = deve->pr_res_key; in transport_lookup_cmd_lun()
88 se_cmd->orig_fe_lun = unpacked_lun; in transport_lookup_cmd_lun()
89 se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD; in transport_lookup_cmd_lun()
90 se_cmd->lun_ref_active = true; in transport_lookup_cmd_lun()
92 if ((se_cmd->data_direction == DMA_TO_DEVICE) && in transport_lookup_cmd_lun()
96 se_cmd->se_tfo->get_fabric_name(), in transport_lookup_cmd_lun()
115 se_cmd->se_tfo->get_fabric_name(), in transport_lookup_cmd_lun()
121 se_cmd->se_lun = se_sess->se_tpg->tpg_virt_lun0; in transport_lookup_cmd_lun()
122 se_cmd->orig_fe_lun = 0; in transport_lookup_cmd_lun()
123 se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD; in transport_lookup_cmd_lun()
126 se_cmd->lun_ref_active = true; in transport_lookup_cmd_lun()
131 if ((se_cmd->data_direction != DMA_FROM_DEVICE) && in transport_lookup_cmd_lun()
132 (se_cmd->data_direction != DMA_NONE)) { in transport_lookup_cmd_lun()
144 se_cmd->se_dev = rcu_dereference_raw(se_lun->lun_se_dev); in transport_lookup_cmd_lun()
145 atomic_long_inc(&se_cmd->se_dev->num_cmds); in transport_lookup_cmd_lun()
147 if (se_cmd->data_direction == DMA_TO_DEVICE) in transport_lookup_cmd_lun()
148 atomic_long_add(se_cmd->data_length, in transport_lookup_cmd_lun()
149 &se_cmd->se_dev->write_bytes); in transport_lookup_cmd_lun()
150 else if (se_cmd->data_direction == DMA_FROM_DEVICE) in transport_lookup_cmd_lun()
151 atomic_long_add(se_cmd->data_length, in transport_lookup_cmd_lun()
152 &se_cmd->se_dev->read_bytes); in transport_lookup_cmd_lun()
158 int transport_lookup_tmr_lun(struct se_cmd *se_cmd, u64 unpacked_lun) in transport_lookup_tmr_lun() argument
162 struct se_session *se_sess = se_cmd->se_sess; in transport_lookup_tmr_lun()
164 struct se_tmr_req *se_tmr = se_cmd->se_tmr_req; in transport_lookup_tmr_lun()
171 se_cmd->se_lun = rcu_dereference(deve->se_lun); in transport_lookup_tmr_lun()
173 se_cmd->pr_res_key = deve->pr_res_key; in transport_lookup_tmr_lun()
174 se_cmd->orig_fe_lun = unpacked_lun; in transport_lookup_tmr_lun()
181 se_cmd->se_tfo->get_fabric_name(), in transport_lookup_tmr_lun()
188 se_cmd->se_dev = rcu_dereference_raw(se_lun->lun_se_dev); in transport_lookup_tmr_lun()
199 bool target_lun_is_rdonly(struct se_cmd *cmd) in target_lun_is_rdonly()
1044 passthrough_parse_cdb(struct se_cmd *cmd, in passthrough_parse_cdb()
1045 sense_reason_t (*exec_cmd)(struct se_cmd *cmd)) in passthrough_parse_cdb()