Home
last modified time | relevance | path

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

/linux-4.4.14/include/target/
Dtarget_core_fabric.h51 int (*check_stop_free)(struct se_cmd *);
52 void (*release_cmd)(struct se_cmd *);
65 int (*write_pending)(struct se_cmd *);
66 int (*write_pending_status)(struct se_cmd *);
68 int (*get_cmd_state)(struct se_cmd *);
69 int (*queue_data_in)(struct se_cmd *);
70 int (*queue_status)(struct se_cmd *);
71 void (*queue_tm_rsp)(struct se_cmd *);
72 void (*aborted_task)(struct se_cmd *);
129 void transport_init_se_cmd(struct se_cmd *,
[all …]
Dtarget_core_backend.h26 void (*transport_complete)(struct se_cmd *cmd,
30 sense_reason_t (*parse_cdb)(struct se_cmd *cmd);
38 unsigned char *(*get_sense_buffer)(struct se_cmd *);
48 sense_reason_t (*execute_rw)(struct se_cmd *cmd, struct scatterlist *,
50 sense_reason_t (*execute_sync_cache)(struct se_cmd *cmd);
51 sense_reason_t (*execute_write_same)(struct se_cmd *cmd);
52 sense_reason_t (*execute_unmap)(struct se_cmd *cmd,
59 void target_complete_cmd(struct se_cmd *, u8);
60 void target_complete_cmd_with_length(struct se_cmd *, u8, int);
62 sense_reason_t spc_parse_cdb(struct se_cmd *cmd, unsigned int *size);
[all …]
Dtarget_core_base.h222 struct se_cmd;
398 struct se_cmd *task_cmd;
437 struct se_cmd { struct
477 sense_reason_t (*execute_cmd)(struct se_cmd *); argument
478 sense_reason_t (*transport_complete_callback)(struct se_cmd *, bool, int *); argument
/linux-4.4.14/drivers/target/
Dtarget_core_xcopy.c55 static int target_xcopy_locate_se_dev_e4(struct se_cmd *se_cmd, struct xcopy_op *xop, in target_xcopy_locate_se_dev_e4() argument
111 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()
177 xop->dst_dev = se_cmd->se_dev; in target_xcopy_parse_tiddesc_e4()
186 static int target_xcopy_parse_target_descriptors(struct se_cmd *se_cmd, in target_xcopy_parse_target_descriptors() argument
190 struct se_device *local_dev = se_cmd->se_dev; in target_xcopy_parse_target_descriptors()
220 rc = target_xcopy_parse_tiddesc_e4(se_cmd, xop, in target_xcopy_parse_target_descriptors()
243 rc = target_xcopy_locate_se_dev_e4(se_cmd, xop, true); in target_xcopy_parse_target_descriptors()
245 rc = target_xcopy_locate_se_dev_e4(se_cmd, xop, false); in target_xcopy_parse_target_descriptors()
261 static int target_xcopy_parse_segdesc_02(struct se_cmd *se_cmd, struct xcopy_op *xop, in target_xcopy_parse_segdesc_02() argument
[all …]
Dtarget_core_tmr.c40 struct se_cmd *se_cmd, in core_tmr_alloc_req() argument
53 se_cmd->se_cmd_flags |= SCF_SCSI_TMR_CDB; in core_tmr_alloc_req()
54 se_cmd->se_tmr_req = tmr; in core_tmr_alloc_req()
55 tmr->task_cmd = se_cmd; in core_tmr_alloc_req()
78 static void core_tmr_handle_tas_abort(struct se_cmd *cmd, int tas) in core_tmr_handle_tas_abort()
98 struct se_cmd *cmd) in target_check_cdb_and_preempt()
112 static bool __target_check_io_state(struct se_cmd *se_cmd, in __target_check_io_state() argument
115 struct se_session *sess = se_cmd->se_sess; in __target_check_io_state()
129 spin_lock(&se_cmd->t_state_lock); in __target_check_io_state()
130 if (se_cmd->transport_state & (CMD_T_COMPLETE | CMD_T_FABRIC_STOP)) { in __target_check_io_state()
[all …]
Dtarget_core_transport.c66 static void transport_complete_task_attr(struct se_cmd *cmd);
67 static void transport_handle_queue_full(struct se_cmd *cmd,
69 static int transport_put_cmd(struct se_cmd *cmd);
531 static void target_remove_from_state_list(struct se_cmd *cmd) in target_remove_from_state_list()
550 static int transport_cmd_check_stop(struct se_cmd *cmd, bool remove_from_lists, in transport_cmd_check_stop()
603 static int transport_cmd_check_stop_to_fabric(struct se_cmd *cmd) in transport_cmd_check_stop_to_fabric()
608 static void transport_lun_remove_cmd(struct se_cmd *cmd) in transport_lun_remove_cmd()
619 void transport_cmd_finish_abort(struct se_cmd *cmd, int remove) in transport_cmd_finish_abort()
640 struct se_cmd *cmd = container_of(work, struct se_cmd, work); in target_complete_failure_work()
650 static unsigned char *transport_get_sense_buffer(struct se_cmd *cmd) in transport_get_sense_buffer()
[all …]
Dtarget_core_user.c120 struct se_cmd *se_cmd; member
157 static struct tcmu_cmd *tcmu_alloc_cmd(struct se_cmd *se_cmd) in tcmu_alloc_cmd() argument
159 struct se_device *se_dev = se_cmd->se_dev; in tcmu_alloc_cmd()
168 tcmu_cmd->se_cmd = se_cmd; in tcmu_alloc_cmd()
170 tcmu_cmd->data_length = se_cmd->data_length; in tcmu_alloc_cmd()
172 if (se_cmd->se_cmd_flags & SCF_BIDI) { in tcmu_alloc_cmd()
173 BUG_ON(!(se_cmd->t_bidi_data_sg && se_cmd->t_bidi_data_nents)); in tcmu_alloc_cmd()
174 tcmu_cmd->data_length += se_cmd->t_bidi_data_sg->length; in tcmu_alloc_cmd()
378 struct se_cmd *se_cmd = tcmu_cmd->se_cmd; in tcmu_queue_cmd_ring() local
399 req.iov[se_cmd->t_bidi_data_nents + in tcmu_queue_cmd_ring()
[all …]
Dtarget_core_device.c59 transport_lookup_cmd_lun(struct se_cmd *se_cmd, u64 unpacked_lun) in transport_lookup_cmd_lun() argument
62 struct se_session *se_sess = se_cmd->se_sess; in transport_lookup_cmd_lun()
72 if (se_cmd->data_direction == DMA_TO_DEVICE) in transport_lookup_cmd_lun()
73 atomic_long_add(se_cmd->data_length, in transport_lookup_cmd_lun()
75 else if (se_cmd->data_direction == DMA_FROM_DEVICE) in transport_lookup_cmd_lun()
76 atomic_long_add(se_cmd->data_length, in transport_lookup_cmd_lun()
80 se_cmd->se_lun = rcu_dereference(deve->se_lun); in transport_lookup_cmd_lun()
81 se_cmd->pr_res_key = deve->pr_res_key; in transport_lookup_cmd_lun()
82 se_cmd->orig_fe_lun = unpacked_lun; in transport_lookup_cmd_lun()
83 se_cmd->se_cmd_flags |= SCF_SE_LUN_CMD; in transport_lookup_cmd_lun()
[all …]
Dtarget_core_pr.h55 extern sense_reason_t target_scsi2_reservation_release(struct se_cmd *);
56 extern sense_reason_t target_scsi2_reservation_reserve(struct se_cmd *);
69 extern sense_reason_t target_scsi3_emulate_pr_in(struct se_cmd *);
70 extern sense_reason_t target_scsi3_emulate_pr_out(struct se_cmd *);
71 extern sense_reason_t target_check_reservation(struct se_cmd *);
Dtarget_core_alua.h91 extern sense_reason_t target_emulate_report_target_port_groups(struct se_cmd *);
92 extern sense_reason_t target_emulate_set_target_port_groups(struct se_cmd *);
93 extern sense_reason_t target_emulate_report_referrals(struct se_cmd *);
94 extern int core_alua_check_nonop_delay(struct se_cmd *);
155 extern sense_reason_t target_alua_state_check(struct se_cmd *cmd);
Dtarget_core_spc.c64 spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_inquiry_std()
125 spc_emulate_evpd_80(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_80()
174 spc_emulate_evpd_83(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_83()
442 spc_emulate_evpd_86(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_86()
484 spc_emulate_evpd_b0(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_b0()
578 spc_emulate_evpd_b1(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_b1()
591 spc_emulate_evpd_b2(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_b2()
643 spc_emulate_evpd_b3(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_b3()
656 spc_emulate_evpd_00(struct se_cmd *cmd, unsigned char *buf);
660 sense_reason_t (*emulate)(struct se_cmd *, unsigned char *);
[all …]
Dtarget_core_internal.h110 struct list_head *, struct se_cmd *);
135 void transport_cmd_finish_abort(struct se_cmd *, int);
136 unsigned char *transport_dump_cmd_direction(struct se_cmd *);
144 bool target_stop_cmd(struct se_cmd *cmd, unsigned long *flags);
146 void transport_send_task_abort(struct se_cmd *);
147 sense_reason_t target_cmd_size_check(struct se_cmd *cmd, unsigned int size);
Dtarget_core_ua.h33 extern sense_reason_t target_scsi3_ua_check(struct se_cmd *);
37 extern void core_scsi3_ua_for_check_condition(struct se_cmd *, u8 *, u8 *);
38 extern int core_scsi3_ua_clear_for_request_sense(struct se_cmd *,
Dtarget_core_xcopy.h16 struct se_cmd *xop_se_cmd;
61 extern sense_reason_t target_do_xcopy(struct se_cmd *);
62 extern sense_reason_t target_do_receive_copy_results(struct se_cmd *);
Dtarget_core_sbc.c40 sbc_check_prot(struct se_device *, struct se_cmd *, unsigned char *, u32, bool);
41 static sense_reason_t sbc_execute_unmap(struct se_cmd *cmd);
44 sbc_emulate_readcapacity(struct se_cmd *cmd) in sbc_emulate_readcapacity()
93 sbc_emulate_readcapacity_16(struct se_cmd *cmd) in sbc_emulate_readcapacity_16()
158 sbc_emulate_startstop(struct se_cmd *cmd) in sbc_emulate_startstop()
189 sector_t sbc_get_write_same_sectors(struct se_cmd *cmd) in sbc_get_write_same_sectors()
213 sbc_execute_write_same_unmap(struct se_cmd *cmd) in sbc_execute_write_same_unmap()
230 sbc_emulate_noop(struct se_cmd *cmd) in sbc_emulate_noop()
236 static inline u32 sbc_get_size(struct se_cmd *cmd, u32 sectors) in sbc_get_size()
314 sbc_setup_write_same(struct se_cmd *cmd, unsigned char *flags, struct sbc_ops *ops) in sbc_setup_write_same()
[all …]
Dtarget_core_iblock.c278 static void iblock_complete_cmd(struct se_cmd *cmd) in iblock_complete_cmd()
297 struct se_cmd *cmd = bio->bi_private; in iblock_bio_done()
315 iblock_get_bio(struct se_cmd *cmd, sector_t lba, u32 sg_num) in iblock_get_bio()
354 struct se_cmd *cmd = bio->bi_private; in iblock_end_io_flush()
374 iblock_execute_sync_cache(struct se_cmd *cmd) in iblock_execute_sync_cache()
397 iblock_execute_unmap(struct se_cmd *cmd, sector_t lba, sector_t nolb) in iblock_execute_unmap()
416 iblock_execute_write_same(struct se_cmd *cmd) in iblock_execute_write_same()
590 iblock_alloc_bip(struct se_cmd *cmd, struct bio *bio) in iblock_alloc_bip()
635 iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, in iblock_execute_rw()
794 iblock_parse_cdb(struct se_cmd *cmd) in iblock_parse_cdb()
Dtarget_core_ua.c39 target_scsi3_ua_check(struct se_cmd *cmd) in target_scsi3_ua_check()
206 struct se_cmd *cmd, in core_scsi3_ua_for_check_condition()
279 struct se_cmd *cmd, in core_scsi3_ua_clear_for_request_sense()
Dtarget_core_file.c249 static int fd_do_rw(struct se_cmd *cmd, struct file *fd, in fd_do_rw()
312 fd_execute_sync_cache(struct se_cmd *cmd) in fd_execute_sync_cache()
357 fd_execute_write_same(struct se_cmd *cmd) in fd_execute_write_same()
444 fd_do_prot_unmap(struct se_cmd *cmd, sector_t lba, sector_t nolb) in fd_do_prot_unmap()
464 fd_execute_unmap(struct se_cmd *cmd, sector_t lba, sector_t nolb) in fd_execute_unmap()
511 fd_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, in fd_execute_rw()
803 fd_parse_cdb(struct se_cmd *cmd) in fd_parse_cdb()
Dtarget_core_pr.c96 target_scsi2_reservation_check(struct se_cmd *cmd) in target_scsi2_reservation_check()
128 static int target_check_scsi2_reservation_conflict(struct se_cmd *cmd) in target_check_scsi2_reservation_conflict()
200 target_scsi2_reservation_release(struct se_cmd *cmd) in target_scsi2_reservation_release()
246 target_scsi2_reservation_reserve(struct se_cmd *cmd) in target_scsi2_reservation_reserve()
316 static int core_scsi3_pr_seq_non_holder(struct se_cmd *cmd, u32 pr_reg_type, in core_scsi3_pr_seq_non_holder()
566 target_scsi3_pr_reservation_check(struct se_cmd *cmd) in target_scsi3_pr_reservation_check()
1499 struct se_cmd *cmd, in core_scsi3_decode_spec_i_port()
2060 core_scsi3_emulate_pro_register(struct se_cmd *cmd, u64 res_key, u64 sa_res_key, in core_scsi3_emulate_pro_register()
2285 core_scsi3_pro_reserve(struct se_cmd *cmd, int type, int scope, u64 res_key) in core_scsi3_pro_reserve()
2441 core_scsi3_emulate_pro_reserve(struct se_cmd *cmd, int type, int scope, in core_scsi3_emulate_pro_reserve()
[all …]
Dtarget_core_alua.c66 target_emulate_report_referrals(struct se_cmd *cmd) in target_emulate_report_referrals()
146 target_emulate_report_target_port_groups(struct se_cmd *cmd) in target_emulate_report_target_port_groups()
279 target_emulate_set_target_port_groups(struct se_cmd *cmd) in target_emulate_set_target_port_groups()
442 static inline void set_ascq(struct se_cmd *cmd, u8 alua_ascq) in set_ascq()
459 struct se_cmd *cmd, in core_alua_state_nonoptimized()
473 struct se_cmd *cmd, in core_alua_state_lba_dependent()
547 struct se_cmd *cmd, in core_alua_state_standby()
604 struct se_cmd *cmd, in core_alua_state_unavailable()
644 struct se_cmd *cmd, in core_alua_state_transition()
681 target_alua_state_check(struct se_cmd *cmd) in target_alua_state_check()
[all …]
Dtarget_core_pscsi.c57 static sense_reason_t pscsi_execute_cmd(struct se_cmd *cmd);
622 static void pscsi_transport_complete(struct se_cmd *cmd, struct scatterlist *sg, in pscsi_transport_complete()
878 pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, in pscsi_map_sg()
982 pscsi_parse_cdb(struct se_cmd *cmd) in pscsi_parse_cdb()
991 pscsi_execute_cmd(struct se_cmd *cmd) in pscsi_execute_cmd()
1097 struct se_cmd *cmd = req->end_io_data; in pscsi_req_done()
Dtarget_core_rd.c401 static sense_reason_t rd_do_prot_rw(struct se_cmd *cmd, bool is_read) in rd_do_prot_rw()
442 rd_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, in rd_execute_rw()
657 rd_parse_cdb(struct se_cmd *cmd) in rd_parse_cdb()
/linux-4.4.14/drivers/target/tcm_fc/
Dtfc_cmd.c49 struct se_cmd *se_cmd; in _ft_dump_cmd() local
53 se_cmd = &cmd->se_cmd; in _ft_dump_cmd()
55 caller, cmd, cmd->sess, cmd->seq, se_cmd); in _ft_dump_cmd()
58 caller, cmd, se_cmd->t_data_nents, in _ft_dump_cmd()
59 se_cmd->data_length, se_cmd->se_cmd_flags); in _ft_dump_cmd()
61 for_each_sg(se_cmd->t_data_sg, sg, se_cmd->t_data_nents, count) in _ft_dump_cmd()
97 percpu_ida_free(&sess->se_sess->sess_tag_pool, cmd->se_cmd.map_tag); in ft_free_cmd()
101 void ft_release_cmd(struct se_cmd *se_cmd) in ft_release_cmd() argument
103 struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd); in ft_release_cmd()
108 int ft_check_stop_free(struct se_cmd *se_cmd) in ft_check_stop_free() argument
[all …]
Dtfc_io.c54 int ft_queue_data_in(struct se_cmd *se_cmd) in ft_queue_data_in() argument
56 struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd); in ft_queue_data_in()
80 if (se_cmd->scsi_status == SAM_STAT_TASK_SET_FULL) in ft_queue_data_in()
87 remaining = se_cmd->data_length; in ft_queue_data_in()
92 BUG_ON(remaining && !se_cmd->t_data_sg); in ft_queue_data_in()
94 sg = se_cmd->t_data_sg; in ft_queue_data_in()
191 se_cmd->scsi_status = SAM_STAT_TASK_SET_FULL; in ft_queue_data_in()
196 return ft_queue_status(se_cmd); in ft_queue_data_in()
203 target_execute_cmd(&cmd->se_cmd); in ft_execute_work()
211 struct se_cmd *se_cmd = &cmd->se_cmd; in ft_recv_write_data() local
[all …]
Dtcm_fc.h118 struct se_cmd se_cmd; /* Local TCM I/O descriptor */ member
154 int ft_check_stop_free(struct se_cmd *);
155 void ft_release_cmd(struct se_cmd *);
156 int ft_queue_status(struct se_cmd *);
157 int ft_queue_data_in(struct se_cmd *);
158 int ft_write_pending(struct se_cmd *);
159 int ft_write_pending_status(struct se_cmd *);
160 int ft_get_cmd_state(struct se_cmd *);
161 void ft_queue_tm_resp(struct se_cmd *);
162 void ft_aborted_task(struct se_cmd *);
/linux-4.4.14/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
59 if (se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB) in tcm_loop_check_stop_free()
65 transport_generic_free_cmd(se_cmd, 0); in tcm_loop_check_stop_free()
69 static void tcm_loop_release_cmd(struct se_cmd *se_cmd) in tcm_loop_release_cmd() argument
71 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_release_cmd()
112 struct se_cmd *se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_submission_work() local
148 se_cmd->se_cmd_flags |= SCF_BIDI; in tcm_loop_submission_work()
155 se_cmd->prot_pto = true; in tcm_loop_submission_work()
164 se_cmd->tag = tl_cmd->sc_cmd_tag; in tcm_loop_submission_work()
[all …]
Dtcm_loop.h13 struct se_cmd tl_se_cmd;
/linux-4.4.14/drivers/scsi/qla2xxx/
Dtcm_qla2xxx.c265 transport_generic_free_cmd(&mcmd->se_cmd, 0); in tcm_qla2xxx_complete_mcmd()
288 transport_generic_free_cmd(&cmd->se_cmd, 0); in tcm_qla2xxx_complete_free()
306 static int tcm_qla2xxx_check_stop_free(struct se_cmd *se_cmd) in tcm_qla2xxx_check_stop_free() argument
310 if ((se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB) == 0) { in tcm_qla2xxx_check_stop_free()
311 cmd = container_of(se_cmd, struct qla_tgt_cmd, se_cmd); in tcm_qla2xxx_check_stop_free()
315 return target_put_sess_cmd(se_cmd); in tcm_qla2xxx_check_stop_free()
321 static void tcm_qla2xxx_release_cmd(struct se_cmd *se_cmd) in tcm_qla2xxx_release_cmd() argument
325 if (se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB) { in tcm_qla2xxx_release_cmd()
326 struct qla_tgt_mgmt_cmd *mcmd = container_of(se_cmd, in tcm_qla2xxx_release_cmd()
327 struct qla_tgt_mgmt_cmd, se_cmd); in tcm_qla2xxx_release_cmd()
[all …]
Dqla_target.c1366 struct se_cmd *se_cmd; in __qlt_24xx_handle_abts() local
1372 list_for_each_entry(se_cmd, &se_sess->sess_cmd_list, se_cmd_list) { in __qlt_24xx_handle_abts()
1374 container_of(se_cmd, struct qla_tgt_cmd, se_cmd); in __qlt_24xx_handle_abts()
1375 if (se_cmd->tag == abts->exchange_addr_to_abort) { in __qlt_24xx_handle_abts()
1581 if (mcmd->se_cmd.se_tmr_req->function == TMR_ABORT_TASK) in qlt_xmit_tm_rsp()
1616 if (cmd->se_cmd.prot_op == TARGET_PROT_NORMAL) { in qlt_pci_map_calc_cnt()
1627 if ((cmd->se_cmd.prot_op == TARGET_PROT_DIN_INSERT) || in qlt_pci_map_calc_cnt()
1628 (cmd->se_cmd.prot_op == TARGET_PROT_DOUT_STRIP)) { in qlt_pci_map_calc_cnt()
1642 if ((cmd->se_cmd.prot_op == TARGET_PROT_DIN_INSERT) || in qlt_pci_map_calc_cnt()
1643 (cmd->se_cmd.prot_op == TARGET_PROT_DOUT_STRIP)) { in qlt_pci_map_calc_cnt()
[all …]
Dqla_target.h934 struct se_cmd se_cmd; member
1019 struct se_cmd se_cmd; member
/linux-4.4.14/drivers/usb/gadget/legacy/
Dtcm_usb_gadget.c157 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
[all …]
Dtcm_usb_gadget.h68 struct se_cmd se_cmd; member
/linux-4.4.14/drivers/infiniband/ulp/isert/
Dib_isert.c72 isert_prot_cmd(struct isert_conn *conn, struct se_cmd *cmd) in isert_prot_cmd()
1296 data_len = cmd->se_cmd.data_length; in isert_handle_scsi_cmd()
1299 cmd->se_cmd.se_cmd_flags |= SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC; in isert_handle_scsi_cmd()
1313 sg_copy_from_buffer(cmd->se_cmd.t_data_sg, sg_nents, in isert_handle_scsi_cmd()
1319 cmd->se_cmd.t_data_sg = &isert_cmd->sg; in isert_handle_scsi_cmd()
1320 cmd->se_cmd.t_data_nents = 1; in isert_handle_scsi_cmd()
1328 if (cmd->write_data_done == cmd->se_cmd.data_length) { in isert_handle_scsi_cmd()
1341 target_put_sess_cmd(&cmd->se_cmd); in isert_handle_scsi_cmd()
1374 cmd->se_cmd.data_length); in isert_handle_iscsi_dataout()
1377 sg_start = &cmd->se_cmd.t_data_sg[sg_off]; in isert_handle_iscsi_dataout()
[all …]
/linux-4.4.14/drivers/target/iscsi/
Discsi_target_tmr.c45 struct se_tmr_req *se_tmr = cmd->se_cmd.se_tmr_req; in iscsit_tmr_abort_task()
121 struct se_tmr_req *se_tmr = cmd->se_cmd.se_tmr_req; in iscsit_tmr_task_reassign()
165 if (ref_lun != ref_cmd->se_cmd.orig_fe_lun) { in iscsit_tmr_task_reassign()
168 ref_lun, ref_cmd->se_cmd.orig_fe_lun); in iscsit_tmr_task_reassign()
241 struct se_cmd *se_cmd = &cmd->se_cmd; in iscsit_task_reassign_complete_write() local
260 if (!(cmd->se_cmd.transport_state & CMD_T_SENT)) { in iscsit_task_reassign_complete_write()
263 cmd->init_task_tag, cmd->se_cmd.t_state); in iscsit_task_reassign_complete_write()
264 target_execute_cmd(se_cmd); in iscsit_task_reassign_complete_write()
283 cmd->se_cmd.data_length) { in iscsit_task_reassign_complete_write()
285 length = (cmd->se_cmd.data_length - offset); in iscsit_task_reassign_complete_write()
[all …]
Discsi_target_seq_pdu_list.c223 if (cmd->se_cmd.data_direction == DMA_TO_DEVICE) in iscsit_determine_counts_for_list()
234 unsolicited_data_length = min(cmd->se_cmd.data_length, in iscsit_determine_counts_for_list()
237 while (offset < cmd->se_cmd.data_length) { in iscsit_determine_counts_for_list()
250 if ((offset + mdsl) >= cmd->se_cmd.data_length) { in iscsit_determine_counts_for_list()
252 (cmd->se_cmd.data_length - offset); in iscsit_determine_counts_for_list()
253 offset += (cmd->se_cmd.data_length - offset); in iscsit_determine_counts_for_list()
272 if ((offset + mdsl) >= cmd->se_cmd.data_length) { in iscsit_determine_counts_for_list()
273 offset += (cmd->se_cmd.data_length - offset); in iscsit_determine_counts_for_list()
306 if (cmd->se_cmd.data_direction == DMA_TO_DEVICE) in iscsit_do_build_pdu_and_seq_lists()
320 unsolicited_data_length = min(cmd->se_cmd.data_length, in iscsit_do_build_pdu_and_seq_lists()
[all …]
Discsi_target_configfs.c1452 static int iscsi_get_cmd_state(struct se_cmd *se_cmd) in iscsi_get_cmd_state() argument
1454 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in iscsi_get_cmd_state()
1478 static int lio_queue_data_in(struct se_cmd *se_cmd) in lio_queue_data_in() argument
1480 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in lio_queue_data_in()
1488 static int lio_write_pending(struct se_cmd *se_cmd) in lio_write_pending() argument
1490 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in lio_write_pending()
1499 static int lio_write_pending_status(struct se_cmd *se_cmd) in lio_write_pending_status() argument
1501 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in lio_write_pending_status()
1511 static int lio_queue_status(struct se_cmd *se_cmd) in lio_queue_status() argument
1513 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in lio_queue_status()
[all …]
Discsi_target_util.c167 cmd->se_cmd.map_tag = tag; in iscsit_allocate_cmd()
332 struct se_cmd *se_cmd = &cmd->se_cmd; in iscsit_check_unsolicited_dataout() local
339 transport_send_check_condition_and_sense(se_cmd, in iscsit_check_unsolicited_dataout()
350 transport_send_check_condition_and_sense(se_cmd, in iscsit_check_unsolicited_dataout()
358 if (((cmd->first_burst_len + payload_length) != cmd->se_cmd.data_length) && in iscsit_check_unsolicited_dataout()
365 conn->sess->sess_ops->FirstBurstLength, cmd->se_cmd.data_length); in iscsit_check_unsolicited_dataout()
366 transport_send_check_condition_and_sense(se_cmd, in iscsit_check_unsolicited_dataout()
690 struct se_cmd *se_cmd = &cmd->se_cmd; in iscsit_release_cmd() local
706 percpu_ida_free(&sess->se_sess->sess_tag_pool, se_cmd->map_tag); in iscsit_release_cmd()
732 struct se_cmd *se_cmd = NULL; in iscsit_free_cmd() local
[all …]
Discsi_target_erl1.c413 struct se_cmd *se_cmd = &cmd->se_cmd; in iscsit_handle_recovery_datain() local
415 if (!(se_cmd->transport_state & CMD_T_COMPLETE)) { in iscsit_handle_recovery_datain()
924 struct se_cmd *se_cmd = &cmd->se_cmd; in iscsit_execute_cmd() local
954 if (transport_check_aborted_status(se_cmd, in iscsit_execute_cmd()
961 return transport_send_check_condition_and_sense(se_cmd, in iscsit_execute_cmd()
971 target_execute_cmd(&cmd->se_cmd); in iscsit_execute_cmd()
983 if (transport_check_aborted_status(se_cmd, 1) in iscsit_execute_cmd()
1003 if (transport_check_aborted_status(se_cmd, 1) != 0) in iscsit_execute_cmd()
1008 return transport_handle_cdb_direct(&cmd->se_cmd); in iscsit_execute_cmd()
1016 if (cmd->se_cmd.se_tmr_req->response) { in iscsit_execute_cmd()
[all …]
Discsi_target_erl0.c48 ((cmd->se_cmd.data_length > in iscsit_set_dataout_sequence_values()
50 conn->sess->sess_ops->FirstBurstLength : cmd->se_cmd.data_length)); in iscsit_set_dataout_sequence_values()
59 cmd->seq_end_offset = (cmd->se_cmd.data_length > in iscsit_set_dataout_sequence_values()
62 conn->sess->sess_ops->MaxBurstLength) : cmd->se_cmd.data_length; in iscsit_set_dataout_sequence_values()
67 cmd->se_cmd.data_length) ? cmd->se_cmd.data_length : in iscsit_set_dataout_sequence_values()
165 transport_send_check_condition_and_sense(&cmd->se_cmd, in iscsit_dataout_check_unsolicited_sequence()
183 if ((first_burst_len != cmd->se_cmd.data_length) && in iscsit_dataout_check_unsolicited_sequence()
189 cmd->se_cmd.data_length); in iscsit_dataout_check_unsolicited_sequence()
190 transport_send_check_condition_and_sense(&cmd->se_cmd, in iscsit_dataout_check_unsolicited_sequence()
202 if (first_burst_len == cmd->se_cmd.data_length) { in iscsit_dataout_check_unsolicited_sequence()
[all …]
Discsi_target.c705 if (cmd->se_cmd.se_tfo != NULL) { in iscsit_add_reject_from_cmd()
707 target_put_sess_cmd(&cmd->se_cmd); in iscsit_add_reject_from_cmd()
740 sg = &cmd->se_cmd.t_data_sg[data_offset / PAGE_SIZE]; in iscsit_map_iovec()
806 u32 iov_count = max(1UL, DIV_ROUND_UP(cmd->se_cmd.data_length, PAGE_SIZE)); in iscsit_allocate_iovecs()
983 transport_init_se_cmd(&cmd->se_cmd, &iscsi_ops, in iscsit_setup_scsi_cmd()
993 target_get_sess_cmd(&cmd->se_cmd, true); in iscsit_setup_scsi_cmd()
995 cmd->sense_reason = transport_lookup_cmd_lun(&cmd->se_cmd, in iscsit_setup_scsi_cmd()
1001 cmd->se_cmd.tag = (__force u32)cmd->init_task_tag; in iscsit_setup_scsi_cmd()
1002 cmd->sense_reason = target_setup_cmd_from_cdb(&cmd->se_cmd, hdr->cdb); in iscsit_setup_scsi_cmd()
1025 core_alua_check_nonop_delay(&cmd->se_cmd); in iscsit_setup_scsi_cmd()
[all …]
Discsi_target_datain_values.c111 read_data_left = (cmd->se_cmd.data_length - read_data_done); in iscsit_set_datain_values_yes_and_yes()
210 read_data_left = (cmd->se_cmd.data_length - read_data_done); in iscsit_set_datain_values_no_and_yes()
229 cmd->se_cmd.data_length) { in iscsit_set_datain_values_no_and_yes()
230 datain->length = (cmd->se_cmd.data_length - offset); in iscsit_set_datain_values_no_and_yes()
262 if ((read_data_done + datain->length) == cmd->se_cmd.data_length) in iscsit_set_datain_values_no_and_yes()
331 read_data_left = (cmd->se_cmd.data_length - read_data_done); in iscsit_set_datain_values_yes_and_no()
342 if ((read_data_done + pdu->length) == cmd->se_cmd.data_length) { in iscsit_set_datain_values_yes_and_no()
431 read_data_left = (cmd->se_cmd.data_length - read_data_done); in iscsit_set_datain_values_no_and_no()
461 if ((read_data_done + pdu->length) == cmd->se_cmd.data_length) in iscsit_set_datain_values_no_and_no()
Discsi_target_erl2.c401 transport_wait_for_tasks(&cmd->se_cmd); in iscsit_prepare_cmds_for_realligance()
/linux-4.4.14/drivers/xen/
Dxen-scsiback.c136 struct se_cmd se_cmd; member
374 resid = pending_req->se_cmd.residual_count; in scsiback_cmd_done()
387 struct se_cmd *se_cmd = &pending_req->se_cmd; in scsiback_cmd_exec() local
393 memset(se_cmd, 0, sizeof(*se_cmd)); in scsiback_cmd_exec()
396 se_cmd->tag = pending_req->rqid; in scsiback_cmd_exec()
397 rc = target_submit_cmd_map_sgls(se_cmd, sess, pending_req->cmnd, in scsiback_cmd_exec()
404 transport_send_check_condition_and_sense(se_cmd, in scsiback_cmd_exec()
406 transport_generic_free_cmd(se_cmd, 0); in scsiback_cmd_exec()
591 struct se_cmd *se_cmd = &pending_req->se_cmd; in scsiback_device_action() local
600 transport_init_se_cmd(se_cmd, tpg->se_tpg.se_tpg_tfo, in scsiback_device_action()
[all …]
/linux-4.4.14/drivers/vhost/
Dscsi.c99 struct se_cmd tvc_se_cmd;
316 static void vhost_scsi_release_cmd(struct se_cmd *se_cmd) in vhost_scsi_release_cmd() argument
318 struct vhost_scsi_cmd *tv_cmd = container_of(se_cmd, in vhost_scsi_release_cmd()
333 percpu_ida_free(&se_sess->sess_tag_pool, se_cmd->map_tag); in vhost_scsi_release_cmd()
351 static int vhost_scsi_write_pending(struct se_cmd *se_cmd) in vhost_scsi_write_pending() argument
354 target_execute_cmd(se_cmd); in vhost_scsi_write_pending()
358 static int vhost_scsi_write_pending_status(struct se_cmd *se_cmd) in vhost_scsi_write_pending_status() argument
368 static int vhost_scsi_get_cmd_state(struct se_cmd *se_cmd) in vhost_scsi_get_cmd_state() argument
382 static int vhost_scsi_queue_data_in(struct se_cmd *se_cmd) in vhost_scsi_queue_data_in() argument
384 struct vhost_scsi_cmd *cmd = container_of(se_cmd, in vhost_scsi_queue_data_in()
[all …]
/linux-4.4.14/drivers/target/sbp/
Dsbp_target.c1234 req->se_cmd.tag = req->orb_pointer; in sbp_handle_command()
1235 if (target_submit_cmd(&req->se_cmd, sess->se_sess, req->cmd_buf, in sbp_handle_command()
1267 if (req->se_cmd.data_direction == DMA_FROM_DEVICE) { in sbp_rw_data()
1301 length = req->se_cmd.data_length; in sbp_rw_data()
1304 sg_miter_start(&iter, req->se_cmd.t_data_sg, req->se_cmd.t_data_nents, in sbp_rw_data()
1368 struct se_cmd *se_cmd = &req->se_cmd; in sbp_sense_mangle() local
1372 WARN_ON(se_cmd->scsi_sense_length < 18); in sbp_sense_mangle()
1398 status[0] |= se_cmd->scsi_status & 0x3f;/* status */ in sbp_sense_mangle()
1403 status[2] = se_cmd->scsi_asc; /* sense_code */ in sbp_sense_mangle()
1404 status[3] = se_cmd->scsi_ascq; /* sense_qualifier */ in sbp_sense_mangle()
[all …]
Dsbp_target.h216 struct se_cmd se_cmd; member
/linux-4.4.14/drivers/infiniband/ulp/srpt/
Dib_srpt.c95 static int srpt_queue_status(struct se_cmd *cmd);
1081 struct se_cmd *cmd; in srpt_map_sg_to_ib_sge()
1672 static int srpt_check_stop_free(struct se_cmd *cmd) in srpt_check_stop_free()
1687 struct se_cmd *cmd; in srpt_handle_cmd()
1771 struct se_cmd *cmd; in srpt_handle_tsk_mgmt()
2879 static int srpt_write_pending_status(struct se_cmd *se_cmd) in srpt_write_pending_status() argument
2883 ioctx = container_of(se_cmd, struct srpt_send_ioctx, cmd); in srpt_write_pending_status()
2890 static int srpt_write_pending(struct se_cmd *se_cmd) in srpt_write_pending() argument
2898 ioctx = container_of(se_cmd, struct srpt_send_ioctx, cmd); in srpt_write_pending()
2946 static void srpt_queue_response(struct se_cmd *cmd) in srpt_queue_response()
[all …]
Dib_srpt.h239 struct se_cmd cmd;
/linux-4.4.14/include/trace/events/
Dtarget.h133 TP_PROTO(struct se_cmd *cmd),
168 TP_PROTO(struct se_cmd *cmd),
/linux-4.4.14/include/target/iscsi/
Discsi_target_core.h484 struct se_cmd se_cmd; member