Lines Matching refs:se_cmd
64 transport_generic_free_cmd(&cmd->se_cmd, 0); in bot_status_complete()
152 if (cmd->se_cmd.scsi_status == SAM_STAT_GOOD) { in bot_send_status()
205 struct se_cmd *se_cmd = &cmd->se_cmd; in bot_send_read_response() local
216 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_ATOMIC); in bot_send_read_response()
220 sg_copy_to_buffer(se_cmd->t_data_sg, in bot_send_read_response()
221 se_cmd->t_data_nents, in bot_send_read_response()
223 se_cmd->data_length); in bot_send_read_response()
228 fu->bot_req_in->num_sgs = se_cmd->t_data_nents; in bot_send_read_response()
229 fu->bot_req_in->sg = se_cmd->t_data_sg; in bot_send_read_response()
233 fu->bot_req_in->length = se_cmd->data_length; in bot_send_read_response()
247 struct se_cmd *se_cmd = &cmd->se_cmd; in bot_send_write_request() local
260 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_KERNEL); in bot_send_write_request()
267 fu->bot_req_out->num_sgs = se_cmd->t_data_nents; in bot_send_write_request()
268 fu->bot_req_out->sg = se_cmd->t_data_sg; in bot_send_write_request()
272 fu->bot_req_out->length = se_cmd->data_length; in bot_send_write_request()
283 target_execute_cmd(se_cmd); in bot_send_write_request()
512 struct se_cmd *se_cmd = &cmd->se_cmd; in uasp_prepare_r_request() local
518 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_ATOMIC); in uasp_prepare_r_request()
522 sg_copy_to_buffer(se_cmd->t_data_sg, in uasp_prepare_r_request()
523 se_cmd->t_data_nents, in uasp_prepare_r_request()
525 se_cmd->data_length); in uasp_prepare_r_request()
530 stream->req_in->num_sgs = se_cmd->t_data_nents; in uasp_prepare_r_request()
531 stream->req_in->sg = se_cmd->t_data_sg; in uasp_prepare_r_request()
536 stream->req_in->length = se_cmd->data_length; in uasp_prepare_r_request()
545 struct se_cmd *se_cmd = &cmd->se_cmd; in uasp_prepare_status() local
556 iu->len = cpu_to_be16(se_cmd->scsi_sense_length); in uasp_prepare_status()
557 iu->status = se_cmd->scsi_status; in uasp_prepare_status()
560 stream->req_status->length = se_cmd->scsi_sense_length + 16; in uasp_prepare_status()
603 transport_generic_free_cmd(&cmd->se_cmd, 0); in uasp_status_data_cmpl()
613 transport_generic_free_cmd(&cmd->se_cmd, 0); in uasp_status_data_cmpl()
676 struct se_cmd *se_cmd = &cmd->se_cmd; in uasp_send_write_request() local
714 target_execute_cmd(se_cmd); in uasp_send_write_request()
958 struct se_cmd *se_cmd = &cmd->se_cmd; in usbg_data_write_cmpl() local
966 sg_copy_from_buffer(se_cmd->t_data_sg, in usbg_data_write_cmpl()
967 se_cmd->t_data_nents, in usbg_data_write_cmpl()
969 se_cmd->data_length); in usbg_data_write_cmpl()
976 transport_generic_free_cmd(&cmd->se_cmd, 0); in usbg_data_write_cmpl()
981 struct se_cmd *se_cmd = &cmd->se_cmd; in usbg_prepare_w_request() local
986 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_ATOMIC); in usbg_prepare_w_request()
993 req->num_sgs = se_cmd->t_data_nents; in usbg_prepare_w_request()
994 req->sg = se_cmd->t_data_sg; in usbg_prepare_w_request()
999 req->length = se_cmd->data_length; in usbg_prepare_w_request()
1004 static int usbg_send_status_response(struct se_cmd *se_cmd) in usbg_send_status_response() argument
1006 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_send_status_response()
1007 se_cmd); in usbg_send_status_response()
1016 static int usbg_send_write_request(struct se_cmd *se_cmd) in usbg_send_write_request() argument
1018 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_send_write_request()
1019 se_cmd); in usbg_send_write_request()
1028 static int usbg_send_read_response(struct se_cmd *se_cmd) in usbg_send_read_response() argument
1030 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_send_read_response()
1031 se_cmd); in usbg_send_read_response()
1043 struct se_cmd *se_cmd; in usbg_cmd_work() local
1048 se_cmd = &cmd->se_cmd; in usbg_cmd_work()
1053 transport_init_se_cmd(se_cmd, in usbg_cmd_work()
1061 if (target_submit_cmd(se_cmd, tv_nexus->tvn_se_sess, cmd->cmd_buf, in usbg_cmd_work()
1069 transport_send_check_condition_and_sense(se_cmd, in usbg_cmd_work()
1071 transport_generic_free_cmd(&cmd->se_cmd, 0); in usbg_cmd_work()
1087 cmd->se_cmd.map_tag = tag; in usbg_get_cmd()
1088 cmd->se_cmd.map_cpu = cpu; in usbg_get_cmd()
1089 cmd->se_cmd.tag = cmd->tag = scsi_tag; in usbg_get_cmd()
1095 static void usbg_release_cmd(struct se_cmd *);
1167 usbg_release_cmd(&cmd->se_cmd); in usbg_submit_command()
1174 struct se_cmd *se_cmd; in bot_cmd_work() local
1179 se_cmd = &cmd->se_cmd; in bot_cmd_work()
1184 transport_init_se_cmd(se_cmd, in bot_cmd_work()
1192 if (target_submit_cmd(se_cmd, tv_nexus->tvn_se_sess, in bot_cmd_work()
1200 transport_send_check_condition_and_sense(se_cmd, in bot_cmd_work()
1202 transport_generic_free_cmd(&cmd->se_cmd, 0); in bot_cmd_work()
1245 cmd->se_cmd.tag = le32_to_cpu(cmd->bot_tag); in bot_submit_command()
1286 static void usbg_release_cmd(struct se_cmd *se_cmd) in usbg_release_cmd() argument
1288 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_release_cmd()
1289 se_cmd); in usbg_release_cmd()
1290 struct se_session *se_sess = se_cmd->se_sess; in usbg_release_cmd()
1293 target_free_tag(se_sess, se_cmd); in usbg_release_cmd()
1305 static int usbg_get_cmd_state(struct se_cmd *se_cmd) in usbg_get_cmd_state() argument
1310 static void usbg_queue_tm_rsp(struct se_cmd *se_cmd) in usbg_queue_tm_rsp() argument
1314 static void usbg_aborted_task(struct se_cmd *se_cmd) in usbg_aborted_task() argument
1707 static int usbg_check_stop_free(struct se_cmd *se_cmd) in usbg_check_stop_free() argument
1709 return target_put_sess_cmd(se_cmd); in usbg_check_stop_free()