Home
last modified time | relevance | path

Searched refs:se_cmd (Results 1 – 25 of 55) sorted by relevance

123

/Linux-v5.10/include/target/
Dtarget_core_fabric.h66 int (*check_stop_free)(struct se_cmd *);
67 void (*release_cmd)(struct se_cmd *);
76 int (*write_pending)(struct se_cmd *);
78 int (*get_cmd_state)(struct se_cmd *);
79 int (*queue_data_in)(struct se_cmd *);
80 int (*queue_status)(struct se_cmd *);
81 void (*queue_tm_rsp)(struct se_cmd *);
82 void (*aborted_task)(struct se_cmd *);
151 void transport_init_se_cmd(struct se_cmd *,
154 sense_reason_t transport_lookup_cmd_lun(struct se_cmd *);
[all …]
Dtarget_core_backend.h42 sense_reason_t (*parse_cdb)(struct se_cmd *cmd);
52 unsigned char *(*get_sense_buffer)(struct se_cmd *);
63 sense_reason_t (*execute_rw)(struct se_cmd *cmd, struct scatterlist *,
65 sense_reason_t (*execute_sync_cache)(struct se_cmd *cmd);
66 sense_reason_t (*execute_write_same)(struct se_cmd *cmd);
67 sense_reason_t (*execute_unmap)(struct se_cmd *cmd,
74 void target_complete_cmd(struct se_cmd *, u8);
75 void target_complete_cmd_with_length(struct se_cmd *, u8, int);
77 void transport_copy_sense_to_cmd(struct se_cmd *, unsigned char *);
79 sense_reason_t spc_parse_cdb(struct se_cmd *cmd, unsigned int *size);
[all …]
/Linux-v5.10/drivers/target/
Dtarget_core_xcopy.c105 static int target_xcopy_parse_tiddesc_e4(struct se_cmd *se_cmd, struct xcopy_op *xop, in target_xcopy_parse_tiddesc_e4() argument
165 xop->src_dev = se_cmd->se_dev; in target_xcopy_parse_tiddesc_e4()
182 xop->dst_dev = se_cmd->se_dev; in target_xcopy_parse_tiddesc_e4()
191 static int target_xcopy_parse_target_descriptors(struct se_cmd *se_cmd, in target_xcopy_parse_target_descriptors() argument
195 struct se_device *local_dev = se_cmd->se_dev; in target_xcopy_parse_target_descriptors()
231 rc = target_xcopy_parse_tiddesc_e4(se_cmd, xop, in target_xcopy_parse_target_descriptors()
284 static int target_xcopy_parse_segdesc_02(struct se_cmd *se_cmd, struct xcopy_op *xop, in target_xcopy_parse_segdesc_02() argument
321 static int target_xcopy_parse_segment_descriptors(struct se_cmd *se_cmd, in target_xcopy_parse_segment_descriptors() argument
351 rc = target_xcopy_parse_segdesc_02(se_cmd, xop, desc); in target_xcopy_parse_segment_descriptors()
378 struct se_cmd se_cmd; member
[all …]
Dtarget_core_tmr.c27 struct se_cmd *se_cmd, in core_tmr_alloc_req() argument
40 se_cmd->se_cmd_flags |= SCF_SCSI_TMR_CDB; in core_tmr_alloc_req()
41 se_cmd->se_tmr_req = tmr; in core_tmr_alloc_req()
42 tmr->task_cmd = se_cmd; in core_tmr_alloc_req()
66 struct se_cmd *cmd) in target_check_cdb_and_preempt()
80 static bool __target_check_io_state(struct se_cmd *se_cmd, in __target_check_io_state() argument
83 struct se_session *sess = se_cmd->se_sess; in __target_check_io_state()
97 spin_lock(&se_cmd->t_state_lock); in __target_check_io_state()
98 if (se_cmd->transport_state & (CMD_T_COMPLETE | CMD_T_FABRIC_STOP)) { in __target_check_io_state()
100 " fabric stop, skipping\n", se_cmd->tag); in __target_check_io_state()
[all …]
Dtarget_core_transport.c53 static void transport_complete_task_attr(struct se_cmd *cmd);
54 static void translate_sense_reason(struct se_cmd *cmd, sense_reason_t reason);
55 static void transport_handle_queue_full(struct se_cmd *cmd,
645 static void target_remove_from_state_list(struct se_cmd *cmd) in target_remove_from_state_list()
668 static int transport_cmd_check_stop_to_fabric(struct se_cmd *cmd) in transport_cmd_check_stop_to_fabric()
706 static void transport_lun_remove_cmd(struct se_cmd *cmd) in transport_lun_remove_cmd()
719 struct se_cmd *cmd = container_of(work, struct se_cmd, work); in target_complete_failure_work()
729 static unsigned char *transport_get_sense_buffer(struct se_cmd *cmd) in transport_get_sense_buffer()
748 void transport_copy_sense_to_cmd(struct se_cmd *cmd, unsigned char *sense) in transport_copy_sense_to_cmd()
766 static void target_handle_abort(struct se_cmd *cmd) in target_handle_abort()
[all …]
Dtarget_core_device.c48 transport_lookup_cmd_lun(struct se_cmd *se_cmd) in transport_lookup_cmd_lun() argument
51 struct se_session *se_sess = se_cmd->se_sess; in transport_lookup_cmd_lun()
57 deve = target_nacl_find_deve(nacl, se_cmd->orig_fe_lun); in transport_lookup_cmd_lun()
61 if (se_cmd->data_direction == DMA_TO_DEVICE) in transport_lookup_cmd_lun()
62 atomic_long_add(se_cmd->data_length, in transport_lookup_cmd_lun()
64 else if (se_cmd->data_direction == DMA_FROM_DEVICE) in transport_lookup_cmd_lun()
65 atomic_long_add(se_cmd->data_length, in transport_lookup_cmd_lun()
75 se_cmd->se_lun = se_lun; in transport_lookup_cmd_lun()
76 se_cmd->pr_res_key = deve->pr_res_key; in transport_lookup_cmd_lun()
77 se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD; in transport_lookup_cmd_lun()
[all …]
Dtarget_core_user.c171 struct se_cmd *se_cmd; member
565 if (tcmu_cmd->se_cmd) in tcmu_free_cmd()
566 tcmu_cmd->se_cmd->priv = NULL; in tcmu_free_cmd()
574 struct se_cmd *se_cmd = cmd->se_cmd; in tcmu_cmd_set_block_cnts() local
576 cmd->dbi_cnt = DIV_ROUND_UP(se_cmd->data_length, DATA_BLOCK_SIZE); in tcmu_cmd_set_block_cnts()
578 if (se_cmd->se_cmd_flags & SCF_BIDI) { in tcmu_cmd_set_block_cnts()
579 BUG_ON(!(se_cmd->t_bidi_data_sg && se_cmd->t_bidi_data_nents)); in tcmu_cmd_set_block_cnts()
580 for (i = 0, len = 0; i < se_cmd->t_bidi_data_nents; i++) in tcmu_cmd_set_block_cnts()
581 len += se_cmd->t_bidi_data_sg[i].length; in tcmu_cmd_set_block_cnts()
625 static struct tcmu_cmd *tcmu_alloc_cmd(struct se_cmd *se_cmd) in tcmu_alloc_cmd() argument
[all …]
Dtarget_core_pr.h62 extern sense_reason_t target_scsi2_reservation_release(struct se_cmd *);
63 extern sense_reason_t target_scsi2_reservation_reserve(struct se_cmd *);
76 extern sense_reason_t target_scsi3_emulate_pr_in(struct se_cmd *);
77 extern sense_reason_t target_scsi3_emulate_pr_out(struct se_cmd *);
78 extern sense_reason_t target_check_reservation(struct se_cmd *);
Dtarget_core_alua.h85 extern sense_reason_t target_emulate_report_target_port_groups(struct se_cmd *);
86 extern sense_reason_t target_emulate_set_target_port_groups(struct se_cmd *);
87 extern sense_reason_t target_emulate_report_referrals(struct se_cmd *);
88 extern int core_alua_check_nonop_delay(struct se_cmd *);
149 extern sense_reason_t target_alua_state_check(struct se_cmd *cmd);
Dtarget_core_spc.c51 spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_inquiry_std()
119 spc_emulate_evpd_80(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_80()
168 spc_emulate_evpd_83(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_83()
438 spc_emulate_evpd_86(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_86()
480 spc_emulate_evpd_b0(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_b0()
574 spc_emulate_evpd_b1(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_b1()
587 spc_emulate_evpd_b2(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_b2()
651 spc_emulate_evpd_b3(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_b3()
664 spc_emulate_evpd_00(struct se_cmd *cmd, unsigned char *buf);
668 sense_reason_t (*emulate)(struct se_cmd *, unsigned char *);
[all …]
Dtarget_core_ua.h36 extern sense_reason_t target_scsi3_ua_check(struct se_cmd *);
40 extern bool core_scsi3_ua_for_check_condition(struct se_cmd *, u8 *, u8 *,
42 extern int core_scsi3_ua_clear_for_request_sense(struct se_cmd *,
/Linux-v5.10/drivers/target/tcm_fc/
Dtfc_cmd.c36 struct se_cmd *se_cmd; in _ft_dump_cmd() local
40 se_cmd = &cmd->se_cmd; in _ft_dump_cmd()
42 caller, cmd, cmd->sess, cmd->seq, se_cmd); in _ft_dump_cmd()
45 caller, cmd, se_cmd->t_data_nents, in _ft_dump_cmd()
46 se_cmd->data_length, se_cmd->se_cmd_flags); in _ft_dump_cmd()
48 for_each_sg(se_cmd->t_data_sg, sg, se_cmd->t_data_nents, count) in _ft_dump_cmd()
82 target_free_tag(sess->se_sess, &cmd->se_cmd); in ft_free_cmd()
86 void ft_release_cmd(struct se_cmd *se_cmd) in ft_release_cmd() argument
88 struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd); in ft_release_cmd()
93 int ft_check_stop_free(struct se_cmd *se_cmd) in ft_check_stop_free() argument
[all …]
Dtfc_io.c42 int ft_queue_data_in(struct se_cmd *se_cmd) in ft_queue_data_in() argument
44 struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd); in ft_queue_data_in()
68 if (se_cmd->scsi_status == SAM_STAT_TASK_SET_FULL) in ft_queue_data_in()
75 remaining = se_cmd->data_length; in ft_queue_data_in()
80 BUG_ON(remaining && !se_cmd->t_data_sg); in ft_queue_data_in()
82 sg = se_cmd->t_data_sg; in ft_queue_data_in()
178 se_cmd->scsi_status = SAM_STAT_TASK_SET_FULL; in ft_queue_data_in()
183 return ft_queue_status(se_cmd); in ft_queue_data_in()
190 target_execute_cmd(&cmd->se_cmd); in ft_execute_work()
198 struct se_cmd *se_cmd = &cmd->se_cmd; in ft_recv_write_data() local
[all …]
Dtcm_fc.h109 struct se_cmd se_cmd; /* Local TCM I/O descriptor */ member
144 int ft_check_stop_free(struct se_cmd *);
145 void ft_release_cmd(struct se_cmd *);
146 int ft_queue_status(struct se_cmd *);
147 int ft_queue_data_in(struct se_cmd *);
148 int ft_write_pending(struct se_cmd *);
149 int ft_get_cmd_state(struct se_cmd *);
150 void ft_queue_tm_resp(struct se_cmd *);
151 void ft_aborted_task(struct se_cmd *);
/Linux-v5.10/drivers/scsi/qla2xxx/
Dtcm_qla2xxx.c239 transport_generic_free_cmd(&mcmd->se_cmd, 0); in tcm_qla2xxx_complete_mcmd()
268 transport_generic_free_cmd(&cmd->se_cmd, 0); in tcm_qla2xxx_complete_free()
283 cmd->se_cmd.map_tag = tag; in tcm_qla2xxx_get_cmd()
284 cmd->se_cmd.map_cpu = cpu; in tcm_qla2xxx_get_cmd()
291 target_free_tag(cmd->sess->se_sess, &cmd->se_cmd); in tcm_qla2xxx_rel_cmd()
314 static int tcm_qla2xxx_check_stop_free(struct se_cmd *se_cmd) in tcm_qla2xxx_check_stop_free() argument
318 if ((se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB) == 0) { in tcm_qla2xxx_check_stop_free()
319 cmd = container_of(se_cmd, struct qla_tgt_cmd, se_cmd); in tcm_qla2xxx_check_stop_free()
323 return target_put_sess_cmd(se_cmd); in tcm_qla2xxx_check_stop_free()
329 static void tcm_qla2xxx_release_cmd(struct se_cmd *se_cmd) in tcm_qla2xxx_release_cmd() argument
[all …]
/Linux-v5.10/drivers/target/loopback/
Dtcm_loop.c47 static int tcm_loop_queue_status(struct se_cmd *se_cmd);
52 static int tcm_loop_check_stop_free(struct se_cmd *se_cmd) in tcm_loop_check_stop_free() argument
54 return transport_generic_free_cmd(se_cmd, 0); in tcm_loop_check_stop_free()
57 static void tcm_loop_release_cmd(struct se_cmd *se_cmd) in tcm_loop_release_cmd() argument
59 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_release_cmd()
100 struct se_cmd *se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_submission_work() local
135 se_cmd->prot_pto = true; in tcm_loop_submission_work()
144 se_cmd->tag = tl_cmd->sc_cmd_tag; in tcm_loop_submission_work()
145 rc = target_submit_cmd_map_sgls(se_cmd, tl_nexus->se_sess, sc->cmnd, in tcm_loop_submission_work()
197 struct se_cmd *se_cmd; in tcm_loop_issue_tmr() local
[all …]
/Linux-v5.10/drivers/usb/gadget/function/
Df_tcm.c64 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()
[all …]
/Linux-v5.10/drivers/infiniband/ulp/isert/
Dib_isert.c51 isert_prot_cmd(struct isert_conn *conn, struct se_cmd *cmd) in isert_prot_cmd()
1036 data_len = cmd->se_cmd.data_length; in isert_handle_scsi_cmd()
1039 cmd->se_cmd.se_cmd_flags |= SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC; in isert_handle_scsi_cmd()
1053 sg_copy_from_buffer(cmd->se_cmd.t_data_sg, sg_nents, in isert_handle_scsi_cmd()
1059 cmd->se_cmd.t_data_sg = &isert_cmd->sg; in isert_handle_scsi_cmd()
1060 cmd->se_cmd.t_data_nents = 1; in isert_handle_scsi_cmd()
1069 if (cmd->write_data_done == cmd->se_cmd.data_length) { in isert_handle_scsi_cmd()
1082 target_put_sess_cmd(&cmd->se_cmd); in isert_handle_scsi_cmd()
1115 cmd->se_cmd.data_length); in isert_handle_iscsi_dataout()
1118 sg_start = &cmd->se_cmd.t_data_sg[sg_off]; in isert_handle_iscsi_dataout()
[all …]
/Linux-v5.10/drivers/target/iscsi/
Discsi_target_tmr.c37 struct se_tmr_req *se_tmr = cmd->se_cmd.se_tmr_req; in iscsit_tmr_abort_task()
113 struct se_tmr_req *se_tmr = cmd->se_cmd.se_tmr_req; in iscsit_tmr_task_reassign()
157 if (ref_lun != ref_cmd->se_cmd.orig_fe_lun) { in iscsit_tmr_task_reassign()
160 ref_lun, ref_cmd->se_cmd.orig_fe_lun); in iscsit_tmr_task_reassign()
233 struct se_cmd *se_cmd = &cmd->se_cmd; in iscsit_task_reassign_complete_write() local
252 if (!(cmd->se_cmd.transport_state & CMD_T_SENT)) { in iscsit_task_reassign_complete_write()
255 cmd->init_task_tag, cmd->se_cmd.t_state); in iscsit_task_reassign_complete_write()
256 target_execute_cmd(se_cmd); in iscsit_task_reassign_complete_write()
275 cmd->se_cmd.data_length) { in iscsit_task_reassign_complete_write()
277 length = (cmd->se_cmd.data_length - offset); in iscsit_task_reassign_complete_write()
[all …]
Discsi_target_seq_pdu_list.c213 if (cmd->se_cmd.data_direction == DMA_TO_DEVICE) in iscsit_determine_counts_for_list()
224 unsolicited_data_length = min(cmd->se_cmd.data_length, in iscsit_determine_counts_for_list()
227 while (offset < cmd->se_cmd.data_length) { in iscsit_determine_counts_for_list()
240 if ((offset + mdsl) >= cmd->se_cmd.data_length) { in iscsit_determine_counts_for_list()
242 (cmd->se_cmd.data_length - offset); in iscsit_determine_counts_for_list()
243 offset += (cmd->se_cmd.data_length - offset); in iscsit_determine_counts_for_list()
262 if ((offset + mdsl) >= cmd->se_cmd.data_length) { in iscsit_determine_counts_for_list()
263 offset += (cmd->se_cmd.data_length - offset); in iscsit_determine_counts_for_list()
296 if (cmd->se_cmd.data_direction == DMA_TO_DEVICE) in iscsit_do_build_pdu_and_seq_lists()
310 unsolicited_data_length = min(cmd->se_cmd.data_length, in iscsit_do_build_pdu_and_seq_lists()
[all …]
Discsi_target_configfs.c1338 static int iscsi_get_cmd_state(struct se_cmd *se_cmd) in iscsi_get_cmd_state() argument
1340 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in iscsi_get_cmd_state()
1364 static int lio_queue_data_in(struct se_cmd *se_cmd) in lio_queue_data_in() argument
1366 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in lio_queue_data_in()
1373 static int lio_write_pending(struct se_cmd *se_cmd) in lio_write_pending() argument
1375 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in lio_write_pending()
1384 static int lio_queue_status(struct se_cmd *se_cmd) in lio_queue_status() argument
1386 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in lio_queue_status()
1391 if (cmd->se_cmd.scsi_status || cmd->sense_reason) { in lio_queue_status()
1397 static void lio_queue_tm_rsp(struct se_cmd *se_cmd) in lio_queue_tm_rsp() argument
[all …]
/Linux-v5.10/drivers/xen/
Dxen-scsiback.c137 struct se_cmd se_cmd; member
342 resid = pending_req->se_cmd.residual_count; in scsiback_cmd_done()
356 target_put_sess_cmd(&pending_req->se_cmd); in scsiback_cmd_done()
361 struct se_cmd *se_cmd = &pending_req->se_cmd; in scsiback_cmd_exec() local
366 se_cmd->tag = pending_req->rqid; in scsiback_cmd_exec()
367 rc = target_submit_cmd_map_sgls(se_cmd, sess, pending_req->cmnd, in scsiback_cmd_exec()
374 transport_send_check_condition_and_sense(se_cmd, in scsiback_cmd_exec()
376 transport_generic_free_cmd(se_cmd, 0); in scsiback_cmd_exec()
561 struct se_cmd *se_cmd = &pending_req->se_cmd; in scsiback_device_action() local
567 rc = target_submit_tmr(&pending_req->se_cmd, nexus->tvn_se_sess, in scsiback_device_action()
[all …]
/Linux-v5.10/drivers/target/sbp/
Dsbp_target.c923 req->se_cmd.map_tag = tag; in sbp_mgt_get_req()
924 req->se_cmd.map_cpu = cpu; in sbp_mgt_get_req()
925 req->se_cmd.tag = next_orb; in sbp_mgt_get_req()
1220 req->se_cmd.tag = req->orb_pointer; in sbp_handle_command()
1221 if (target_submit_cmd(&req->se_cmd, sess->se_sess, req->cmd_buf, in sbp_handle_command()
1252 if (req->se_cmd.data_direction == DMA_FROM_DEVICE) { in sbp_rw_data()
1286 length = req->se_cmd.data_length; in sbp_rw_data()
1289 sg_miter_start(&iter, req->se_cmd.t_data_sg, req->se_cmd.t_data_nents, in sbp_rw_data()
1354 target_put_sess_cmd(&req->se_cmd); in sbp_send_status()
1360 struct se_cmd *se_cmd = &req->se_cmd; in sbp_sense_mangle() local
[all …]
/Linux-v5.10/drivers/scsi/ibmvscsi_tgt/
Dibmvscsi_tgt.c57 static void ibmvscsis_determine_resid(struct se_cmd *se_cmd, in ibmvscsis_determine_resid() argument
60 u32 residual_count = se_cmd->residual_count; in ibmvscsis_determine_resid()
65 if (se_cmd->se_cmd_flags & SCF_UNDERFLOW_BIT) { in ibmvscsis_determine_resid()
66 if (se_cmd->data_direction == DMA_TO_DEVICE) { in ibmvscsis_determine_resid()
70 } else if (se_cmd->data_direction == DMA_FROM_DEVICE) { in ibmvscsis_determine_resid()
75 } else if (se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) { in ibmvscsis_determine_resid()
76 if (se_cmd->data_direction == DMA_TO_DEVICE) { in ibmvscsis_determine_resid()
80 } else if (se_cmd->data_direction == DMA_FROM_DEVICE) { in ibmvscsis_determine_resid()
1289 memset(&cmd->se_cmd, 0, sizeof(cmd->se_cmd)); in ibmvscsis_get_free_cmd()
1908 if (cmd->se_cmd.transport_state & CMD_T_ABORTED && in ibmvscsis_send_messages()
[all …]
/Linux-v5.10/drivers/vhost/
Dscsi.c103 struct se_cmd tvc_se_cmd;
222 struct se_cmd se_cmd; member
341 static void vhost_scsi_release_cmd_res(struct se_cmd *se_cmd) in vhost_scsi_release_cmd_res() argument
343 struct vhost_scsi_cmd *tv_cmd = container_of(se_cmd, in vhost_scsi_release_cmd_res()
359 sbitmap_clear_bit(&svq->scsi_tags, se_cmd->map_tag); in vhost_scsi_release_cmd_res()
374 static void vhost_scsi_release_cmd(struct se_cmd *se_cmd) in vhost_scsi_release_cmd() argument
376 if (se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB) { in vhost_scsi_release_cmd()
377 struct vhost_scsi_tmf *tmf = container_of(se_cmd, in vhost_scsi_release_cmd()
378 struct vhost_scsi_tmf, se_cmd); in vhost_scsi_release_cmd()
382 struct vhost_scsi_cmd *cmd = container_of(se_cmd, in vhost_scsi_release_cmd()
[all …]

123