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()
535 stream->req_in->length = se_cmd->data_length; in uasp_prepare_r_request()
544 struct se_cmd *se_cmd = &cmd->se_cmd; in uasp_prepare_status() local
555 iu->len = cpu_to_be16(se_cmd->scsi_sense_length); in uasp_prepare_status()
556 iu->status = se_cmd->scsi_status; in uasp_prepare_status()
558 stream->req_status->length = se_cmd->scsi_sense_length + 16; in uasp_prepare_status()
601 transport_generic_free_cmd(&cmd->se_cmd, 0); in uasp_status_data_cmpl()
611 transport_generic_free_cmd(&cmd->se_cmd, 0); in uasp_status_data_cmpl()
674 struct se_cmd *se_cmd = &cmd->se_cmd; in uasp_send_write_request() local
712 target_execute_cmd(se_cmd); in uasp_send_write_request()
955 struct se_cmd *se_cmd = &cmd->se_cmd; in usbg_data_write_cmpl() local
963 sg_copy_from_buffer(se_cmd->t_data_sg, in usbg_data_write_cmpl()
964 se_cmd->t_data_nents, in usbg_data_write_cmpl()
966 se_cmd->data_length); in usbg_data_write_cmpl()
973 transport_generic_free_cmd(&cmd->se_cmd, 0); in usbg_data_write_cmpl()
978 struct se_cmd *se_cmd = &cmd->se_cmd; in usbg_prepare_w_request() local
983 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_ATOMIC); in usbg_prepare_w_request()
990 req->num_sgs = se_cmd->t_data_nents; in usbg_prepare_w_request()
991 req->sg = se_cmd->t_data_sg; in usbg_prepare_w_request()
995 req->length = se_cmd->data_length; in usbg_prepare_w_request()
1000 static int usbg_send_status_response(struct se_cmd *se_cmd) in usbg_send_status_response() argument
1002 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_send_status_response()
1003 se_cmd); in usbg_send_status_response()
1012 static int usbg_send_write_request(struct se_cmd *se_cmd) in usbg_send_write_request() argument
1014 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_send_write_request()
1015 se_cmd); in usbg_send_write_request()
1024 static int usbg_send_read_response(struct se_cmd *se_cmd) in usbg_send_read_response() argument
1026 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_send_read_response()
1027 se_cmd); in usbg_send_read_response()
1039 struct se_cmd *se_cmd; in usbg_cmd_work() local
1044 se_cmd = &cmd->se_cmd; in usbg_cmd_work()
1049 transport_init_se_cmd(se_cmd, in usbg_cmd_work()
1056 if (target_submit_cmd(se_cmd, tv_nexus->tvn_se_sess, cmd->cmd_buf, in usbg_cmd_work()
1064 transport_send_check_condition_and_sense(se_cmd, in usbg_cmd_work()
1066 transport_generic_free_cmd(&cmd->se_cmd, 0); in usbg_cmd_work()
1082 cmd->se_cmd.map_tag = tag; in usbg_get_cmd()
1083 cmd->se_cmd.map_cpu = cpu; in usbg_get_cmd()
1084 cmd->se_cmd.tag = cmd->tag = scsi_tag; in usbg_get_cmd()
1090 static void usbg_release_cmd(struct se_cmd *);
1162 usbg_release_cmd(&cmd->se_cmd); in usbg_submit_command()
1169 struct se_cmd *se_cmd; in bot_cmd_work() local
1174 se_cmd = &cmd->se_cmd; in bot_cmd_work()
1179 transport_init_se_cmd(se_cmd, in bot_cmd_work()
1186 if (target_submit_cmd(se_cmd, tv_nexus->tvn_se_sess, in bot_cmd_work()
1194 transport_send_check_condition_and_sense(se_cmd, in bot_cmd_work()
1196 transport_generic_free_cmd(&cmd->se_cmd, 0); in bot_cmd_work()
1239 cmd->se_cmd.tag = le32_to_cpu(cmd->bot_tag); in bot_submit_command()
1280 static void usbg_release_cmd(struct se_cmd *se_cmd) in usbg_release_cmd() argument
1282 struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, in usbg_release_cmd()
1283 se_cmd); in usbg_release_cmd()
1284 struct se_session *se_sess = se_cmd->se_sess; in usbg_release_cmd()
1287 target_free_tag(se_sess, se_cmd); in usbg_release_cmd()
1299 static int usbg_get_cmd_state(struct se_cmd *se_cmd) in usbg_get_cmd_state() argument
1304 static void usbg_queue_tm_rsp(struct se_cmd *se_cmd) in usbg_queue_tm_rsp() argument
1308 static void usbg_aborted_task(struct se_cmd *se_cmd) in usbg_aborted_task() argument
1701 static int usbg_check_stop_free(struct se_cmd *se_cmd) in usbg_check_stop_free() argument
1703 return target_put_sess_cmd(se_cmd); in usbg_check_stop_free()