Lines Matching refs:se_cmd

157 	if (cmd->se_cmd.scsi_status == SAM_STAT_GOOD) {  in bot_send_status()
210 struct se_cmd *se_cmd = &cmd->se_cmd; in bot_send_read_response() local
221 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_ATOMIC); in bot_send_read_response()
225 sg_copy_to_buffer(se_cmd->t_data_sg, in bot_send_read_response()
226 se_cmd->t_data_nents, in bot_send_read_response()
228 se_cmd->data_length); in bot_send_read_response()
233 fu->bot_req_in->num_sgs = se_cmd->t_data_nents; in bot_send_read_response()
234 fu->bot_req_in->sg = se_cmd->t_data_sg; in bot_send_read_response()
238 fu->bot_req_in->length = se_cmd->data_length; in bot_send_read_response()
252 struct se_cmd *se_cmd = &cmd->se_cmd; in bot_send_write_request() local
265 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_KERNEL); in bot_send_write_request()
272 fu->bot_req_out->num_sgs = se_cmd->t_data_nents; in bot_send_write_request()
273 fu->bot_req_out->sg = se_cmd->t_data_sg; in bot_send_write_request()
277 fu->bot_req_out->length = se_cmd->data_length; in bot_send_write_request()
288 target_execute_cmd(se_cmd); in bot_send_write_request()
519 struct se_cmd *se_cmd = &cmd->se_cmd; in uasp_prepare_r_request() local
525 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_ATOMIC); in uasp_prepare_r_request()
529 sg_copy_to_buffer(se_cmd->t_data_sg, in uasp_prepare_r_request()
530 se_cmd->t_data_nents, in uasp_prepare_r_request()
532 se_cmd->data_length); in uasp_prepare_r_request()
537 stream->req_in->num_sgs = se_cmd->t_data_nents; in uasp_prepare_r_request()
538 stream->req_in->sg = se_cmd->t_data_sg; in uasp_prepare_r_request()
542 stream->req_in->length = se_cmd->data_length; in uasp_prepare_r_request()
551 struct se_cmd *se_cmd = &cmd->se_cmd; in uasp_prepare_status() local
562 iu->len = cpu_to_be16(se_cmd->scsi_sense_length); in uasp_prepare_status()
563 iu->status = se_cmd->scsi_status; in uasp_prepare_status()
565 stream->req_status->length = se_cmd->scsi_sense_length + 16; in uasp_prepare_status()
681 struct se_cmd *se_cmd = &cmd->se_cmd; in uasp_send_write_request() local
719 target_execute_cmd(se_cmd); in uasp_send_write_request()
961 struct se_cmd *se_cmd = &cmd->se_cmd; in usbg_data_write_cmpl() local
969 sg_copy_from_buffer(se_cmd->t_data_sg, in usbg_data_write_cmpl()
970 se_cmd->t_data_nents, in usbg_data_write_cmpl()
972 se_cmd->data_length); in usbg_data_write_cmpl()
984 struct se_cmd *se_cmd = &cmd->se_cmd; in usbg_prepare_w_request() local
989 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_ATOMIC); in usbg_prepare_w_request()
996 req->num_sgs = se_cmd->t_data_nents; in usbg_prepare_w_request()
997 req->sg = se_cmd->t_data_sg; in usbg_prepare_w_request()
1001 req->length = se_cmd->data_length; in usbg_prepare_w_request()
1006 static int usbg_send_status_response(struct se_cmd *se_cmd) in usbg_send_status_response() argument
1008 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_send_status_response()
1009 se_cmd); in usbg_send_status_response()
1018 static int usbg_send_write_request(struct se_cmd *se_cmd) in usbg_send_write_request() argument
1020 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_send_write_request()
1021 se_cmd); in usbg_send_write_request()
1030 static int usbg_send_read_response(struct se_cmd *se_cmd) in usbg_send_read_response() argument
1032 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_send_read_response()
1033 se_cmd); in usbg_send_read_response()
1045 struct se_cmd *se_cmd; in usbg_cmd_work() local
1050 se_cmd = &cmd->se_cmd; in usbg_cmd_work()
1055 transport_init_se_cmd(se_cmd, in usbg_cmd_work()
1062 if (target_submit_cmd(se_cmd, tv_nexus->tvn_se_sess, in usbg_cmd_work()
1070 transport_send_check_condition_and_sense(se_cmd, in usbg_cmd_work()
1081 struct se_cmd *se_cmd; in usbg_submit_command() local
1109 cmd->se_cmd.tag = cmd->tag; in usbg_submit_command()
1145 se_cmd = &cmd->se_cmd; in usbg_submit_command()
1162 struct se_cmd *se_cmd; in bot_cmd_work() local
1167 se_cmd = &cmd->se_cmd; in bot_cmd_work()
1172 transport_init_se_cmd(se_cmd, in bot_cmd_work()
1179 if (target_submit_cmd(se_cmd, tv_nexus->tvn_se_sess, in bot_cmd_work()
1187 transport_send_check_condition_and_sense(se_cmd, in bot_cmd_work()
1198 struct se_cmd *se_cmd; in bot_submit_command() local
1239 se_cmd = &cmd->se_cmd; in bot_submit_command()
1243 cmd->se_cmd.tag = le32_to_cpu(cmd->bot_tag); in bot_submit_command()
1299 transport_generic_free_cmd(&cmd->se_cmd, 0); in usbg_cmd_release()
1302 static void usbg_release_cmd(struct se_cmd *se_cmd) in usbg_release_cmd() argument
1304 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_release_cmd()
1305 se_cmd); in usbg_release_cmd()
1329 static int usbg_write_pending_status(struct se_cmd *se_cmd) in usbg_write_pending_status() argument
1339 static int usbg_get_cmd_state(struct se_cmd *se_cmd) in usbg_get_cmd_state() argument
1344 static void usbg_queue_tm_rsp(struct se_cmd *se_cmd) in usbg_queue_tm_rsp() argument
1348 static void usbg_aborted_task(struct se_cmd *se_cmd) in usbg_aborted_task() argument
1693 static int usbg_check_stop_free(struct se_cmd *se_cmd) in usbg_check_stop_free() argument
1695 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_check_stop_free()
1696 se_cmd); in usbg_check_stop_free()