Lines Matching defs:se_cmd

35 	struct se_cmd *se_cmd;
39 se_cmd = &cmd->se_cmd;
40 pr_debug("%s: cmd %p sess %p seq %p se_cmd %p\n",
41 caller, cmd, cmd->sess, cmd->seq, se_cmd);
44 caller, cmd, se_cmd->t_data_nents,
45 se_cmd->data_length, se_cmd->se_cmd_flags);
47 for_each_sg(se_cmd->t_data_sg, sg, se_cmd->t_data_nents, count)
81 target_free_tag(sess->se_sess, &cmd->se_cmd);
85 void ft_release_cmd(struct se_cmd *se_cmd)
87 struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd);
92 int ft_check_stop_free(struct se_cmd *se_cmd)
94 return transport_generic_free_cmd(se_cmd, 0);
100 int ft_queue_status(struct se_cmd *se_cmd)
102 struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd);
115 len = sizeof(*fcp) + se_cmd->scsi_sense_length;
118 se_cmd->scsi_status = SAM_STAT_TASK_SET_FULL;
124 fcp->resp.fr_status = se_cmd->scsi_status;
126 len = se_cmd->scsi_sense_length;
130 memcpy((fcp + 1), se_cmd->sense_buffer, len);
137 if (se_cmd->se_cmd_flags & (SCF_OVERFLOW_BIT | SCF_UNDERFLOW_BIT)) {
138 if (se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT)
142 fcp->ext.fr_resid = cpu_to_be32(se_cmd->residual_count);
158 * to reduce it's queue_depth after the se_cmd response has
161 se_cmd->scsi_status = SAM_STAT_TASK_SET_FULL;
168 * final se_cmd->cmd_kref put.
170 target_put_sess_cmd(&cmd->se_cmd);
177 int ft_write_pending(struct se_cmd *se_cmd)
179 struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd);
199 txrdy->ft_burst_len = htonl(se_cmd->data_length);
215 if ((se_cmd->se_cmd_flags & SCF_SCSI_DATA_CDB) &&
217 se_cmd->t_data_sg,
218 se_cmd->t_data_nents))
255 transport_generic_free_cmd(&cmd->se_cmd, 0);
365 rc = target_submit_tmr(&cmd->se_cmd, cmd->sess->se_sess,
375 void ft_queue_tm_resp(struct se_cmd *se_cmd)
377 struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd);
378 struct se_tmr_req *tmr = se_cmd->se_tmr_req;
405 * final se_cmd->cmd_kref put.
407 target_put_sess_cmd(&cmd->se_cmd);
410 void ft_aborted_task(struct se_cmd *se_cmd)
434 cmd->se_cmd.map_tag = tag;
435 cmd->se_cmd.map_cpu = cpu;
439 target_free_tag(se_sess, &cmd->se_cmd);
540 cmd->se_cmd.tag = fc_seq_exch(cmd->seq)->rxid;
543 * Use a single se_cmd->cmd_kref as we expect to release se_cmd
546 if (target_init_cmd(&cmd->se_cmd, cmd->sess->se_sess,
552 if (target_submit_prep(&cmd->se_cmd, fcp->fc_cdb, NULL, 0, NULL, 0,
556 target_submit(&cmd->se_cmd);