Lines Matching refs:se_cmd
65 transport_generic_free_cmd(&cmd->se_cmd, 0); in bot_status_complete()
154 if (cmd->se_cmd.scsi_status == SAM_STAT_GOOD) { in bot_send_status()
202 transport_generic_free_cmd(&cmd->se_cmd, 0); in bot_read_compl()
212 struct se_cmd *se_cmd = &cmd->se_cmd; in bot_send_read_response() local
223 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_ATOMIC); in bot_send_read_response()
227 sg_copy_to_buffer(se_cmd->t_data_sg, in bot_send_read_response()
228 se_cmd->t_data_nents, in bot_send_read_response()
230 se_cmd->data_length); in bot_send_read_response()
235 fu->bot_req_in->num_sgs = se_cmd->t_data_nents; in bot_send_read_response()
236 fu->bot_req_in->sg = se_cmd->t_data_sg; in bot_send_read_response()
240 fu->bot_req_in->length = se_cmd->data_length; in bot_send_read_response()
559 struct se_cmd *se_cmd = &cmd->se_cmd; in uasp_prepare_r_request() local
562 struct uas_stream *stream = &fu->stream[se_cmd->map_tag]; in uasp_prepare_r_request()
565 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_ATOMIC); in uasp_prepare_r_request()
569 sg_copy_to_buffer(se_cmd->t_data_sg, in uasp_prepare_r_request()
570 se_cmd->t_data_nents, in uasp_prepare_r_request()
572 se_cmd->data_length); in uasp_prepare_r_request()
577 stream->req_in->num_sgs = se_cmd->t_data_nents; in uasp_prepare_r_request()
578 stream->req_in->sg = se_cmd->t_data_sg; in uasp_prepare_r_request()
584 stream->req_in->length = se_cmd->data_length; in uasp_prepare_r_request()
593 struct se_cmd *se_cmd = &cmd->se_cmd; in uasp_prepare_status() local
595 struct uas_stream *stream = &cmd->fu->stream[se_cmd->map_tag]; in uasp_prepare_status()
604 iu->len = cpu_to_be16(se_cmd->scsi_sense_length); in uasp_prepare_status()
605 iu->status = se_cmd->scsi_status; in uasp_prepare_status()
609 stream->req_status->length = se_cmd->scsi_sense_length + 16; in uasp_prepare_status()
616 struct se_cmd *se_cmd = &cmd->se_cmd; in uasp_prepare_response() local
618 struct uas_stream *stream = &cmd->fu->stream[se_cmd->map_tag]; in uasp_prepare_response()
628 tcm_to_uasp_response(se_cmd->se_tmr_req->response); in uasp_prepare_response()
666 static void usbg_release_cmd(struct se_cmd *se_cmd);
673 struct uas_stream *stream = &fu->stream[cmd->se_cmd.map_tag]; in uasp_status_data_cmpl()
730 cmd->se_cmd.map_tag, in uasp_status_data_cmpl()
731 cmd->se_cmd.map_cpu); in uasp_status_data_cmpl()
733 transport_generic_free_cmd(&cmd->se_cmd, 0); in uasp_status_data_cmpl()
747 transport_generic_free_cmd(&cmd->se_cmd, 0); in uasp_status_data_cmpl()
753 struct uas_stream *stream = &fu->stream[cmd->se_cmd.map_tag]; in uasp_send_status_response()
765 struct uas_stream *stream = &fu->stream[cmd->se_cmd.map_tag]; in uasp_send_tm_response()
777 struct uas_stream *stream = &fu->stream[cmd->se_cmd.map_tag]; in uasp_send_read_response()
820 struct se_cmd *se_cmd = &cmd->se_cmd; in uasp_send_write_request() local
821 struct uas_stream *stream = &fu->stream[se_cmd->map_tag]; in uasp_send_write_request()
1080 struct se_cmd *se_cmd = &cmd->se_cmd; in usbg_data_write_cmpl() local
1085 struct uas_stream *stream = &cmd->fu->stream[se_cmd->map_tag]; in usbg_data_write_cmpl()
1088 target_put_sess_cmd(se_cmd); in usbg_data_write_cmpl()
1089 transport_generic_free_cmd(&cmd->se_cmd, 0); in usbg_data_write_cmpl()
1099 sg_copy_from_buffer(se_cmd->t_data_sg, in usbg_data_write_cmpl()
1100 se_cmd->t_data_nents, in usbg_data_write_cmpl()
1102 se_cmd->data_length); in usbg_data_write_cmpl()
1110 target_put_sess_cmd(se_cmd); in usbg_data_write_cmpl()
1119 transport_send_check_condition_and_sense(se_cmd, in usbg_data_write_cmpl()
1125 struct se_cmd *se_cmd = &cmd->se_cmd; in usbg_prepare_w_request() local
1130 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_ATOMIC); in usbg_prepare_w_request()
1137 req->num_sgs = se_cmd->t_data_nents; in usbg_prepare_w_request()
1138 req->sg = se_cmd->t_data_sg; in usbg_prepare_w_request()
1144 req->length = se_cmd->data_length; in usbg_prepare_w_request()
1151 static int usbg_send_status_response(struct se_cmd *se_cmd) in usbg_send_status_response() argument
1153 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_send_status_response()
1154 se_cmd); in usbg_send_status_response()
1163 static int usbg_send_write_request(struct se_cmd *se_cmd) in usbg_send_write_request() argument
1165 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_send_write_request()
1166 se_cmd); in usbg_send_write_request()
1175 static int usbg_send_read_response(struct se_cmd *se_cmd) in usbg_send_read_response() argument
1177 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_send_read_response()
1178 se_cmd); in usbg_send_read_response()
1187 static void usbg_aborted_task(struct se_cmd *se_cmd);
1192 struct se_cmd *se_cmd; in usbg_submit_tmr() local
1195 se_cmd = &cmd->se_cmd; in usbg_submit_tmr()
1198 target_submit_tmr(se_cmd, se_sess, in usbg_submit_tmr()
1206 struct se_cmd *se_cmd; in usbg_submit_cmd() local
1217 target_execute_cmd(&cmd->se_cmd); in usbg_submit_cmd()
1222 se_cmd = &cmd->se_cmd; in usbg_submit_cmd()
1229 target_submit_cmd(se_cmd, tv_nexus->tvn_se_sess, cmd->cmd_buf, in usbg_submit_cmd()
1236 __target_init_cmd(se_cmd, in usbg_submit_cmd()
1241 transport_send_check_condition_and_sense(se_cmd, in usbg_submit_cmd()
1319 cmd->se_cmd.map_tag, in usbg_cmd_work()
1320 cmd->se_cmd.map_cpu); in usbg_cmd_work()
1327 usbg_aborted_task(&active_cmd->se_cmd); in usbg_cmd_work()
1349 cmd->se_cmd.map_tag = tag; in usbg_get_cmd()
1350 cmd->se_cmd.map_cpu = cpu; in usbg_get_cmd()
1351 cmd->se_cmd.cpuid = cpu; in usbg_get_cmd()
1352 cmd->se_cmd.tag = cmd->tag = scsi_tag; in usbg_get_cmd()
1358 static void usbg_release_cmd(struct se_cmd *);
1388 cmd->se_cmd.tag = scsi_tag; in usbg_submit_command()
1417 stream = &fu->stream[cmd->se_cmd.map_tag]; in usbg_submit_command()
1430 target_free_tag(tv_nexus->tvn_se_sess, &cmd->se_cmd); in usbg_submit_command()
1465 struct se_cmd *se_cmd; in bot_cmd_work() local
1477 target_execute_cmd(&cmd->se_cmd); in bot_cmd_work()
1482 se_cmd = &cmd->se_cmd; in bot_cmd_work()
1489 target_submit_cmd(se_cmd, tv_nexus->tvn_se_sess, in bot_cmd_work()
1495 __target_init_cmd(se_cmd, in bot_cmd_work()
1500 transport_send_check_condition_and_sense(se_cmd, in bot_cmd_work()
1544 cmd->se_cmd.tag = le32_to_cpu(cmd->bot_tag); in bot_submit_command()
1576 static void usbg_release_cmd(struct se_cmd *se_cmd) in usbg_release_cmd() argument
1578 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_release_cmd()
1579 se_cmd); in usbg_release_cmd()
1580 struct se_session *se_sess = se_cmd->se_sess; in usbg_release_cmd()
1584 target_free_tag(se_sess, se_cmd); in usbg_release_cmd()
1587 static void usbg_queue_tm_rsp(struct se_cmd *se_cmd) in usbg_queue_tm_rsp() argument
1589 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, se_cmd); in usbg_queue_tm_rsp()
1594 static void usbg_aborted_task(struct se_cmd *se_cmd) in usbg_aborted_task() argument
1596 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, se_cmd); in usbg_aborted_task()
1599 struct uas_stream *stream = &fu->stream[se_cmd->map_tag]; in usbg_aborted_task()
1986 static int usbg_check_stop_free(struct se_cmd *se_cmd) in usbg_check_stop_free() argument
1988 return target_put_sess_cmd(se_cmd); in usbg_check_stop_free()