/linux-4.1.27/drivers/target/ |
D | target_core_xcopy.c | 57 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 113 static int target_xcopy_parse_tiddesc_e4(struct se_cmd *se_cmd, struct xcopy_op *xop, in target_xcopy_parse_tiddesc_e4() argument 167 xop->src_dev = se_cmd->se_dev; in target_xcopy_parse_tiddesc_e4() 179 xop->dst_dev = se_cmd->se_dev; in target_xcopy_parse_tiddesc_e4() 188 static int target_xcopy_parse_target_descriptors(struct se_cmd *se_cmd, in target_xcopy_parse_target_descriptors() argument 192 struct se_device *local_dev = se_cmd->se_dev; in target_xcopy_parse_target_descriptors() 222 rc = target_xcopy_parse_tiddesc_e4(se_cmd, xop, in target_xcopy_parse_target_descriptors() 245 rc = target_xcopy_locate_se_dev_e4(se_cmd, xop, true); in target_xcopy_parse_target_descriptors() 247 rc = target_xcopy_locate_se_dev_e4(se_cmd, xop, false); in target_xcopy_parse_target_descriptors() 263 static int target_xcopy_parse_segdesc_02(struct se_cmd *se_cmd, struct xcopy_op *xop, in target_xcopy_parse_segdesc_02() argument [all …]
|
D | target_core_tmr.c | 43 struct se_cmd *se_cmd, in core_tmr_alloc_req() argument 56 se_cmd->se_cmd_flags |= SCF_SCSI_TMR_CDB; in core_tmr_alloc_req() 57 se_cmd->se_tmr_req = tmr; in core_tmr_alloc_req() 58 tmr->task_cmd = se_cmd; in core_tmr_alloc_req() 81 static void core_tmr_handle_tas_abort(struct se_cmd *cmd, int tas) in core_tmr_handle_tas_abort() 101 struct se_cmd *cmd) in target_check_cdb_and_preempt() 115 static bool __target_check_io_state(struct se_cmd *se_cmd, in __target_check_io_state() argument 118 struct se_session *sess = se_cmd->se_sess; in __target_check_io_state() 132 spin_lock(&se_cmd->t_state_lock); in __target_check_io_state() 133 if (se_cmd->transport_state & (CMD_T_COMPLETE | CMD_T_FABRIC_STOP)) { in __target_check_io_state() [all …]
|
D | target_core_transport.c | 68 static void transport_complete_task_attr(struct se_cmd *cmd); 69 static void transport_handle_queue_full(struct se_cmd *cmd, 71 static int transport_put_cmd(struct se_cmd *cmd); 558 static void target_remove_from_state_list(struct se_cmd *cmd) in target_remove_from_state_list() 577 static int transport_cmd_check_stop(struct se_cmd *cmd, bool remove_from_lists, in transport_cmd_check_stop() 631 static int transport_cmd_check_stop_to_fabric(struct se_cmd *cmd) in transport_cmd_check_stop_to_fabric() 636 static void transport_lun_remove_cmd(struct se_cmd *cmd) in transport_lun_remove_cmd() 647 void transport_cmd_finish_abort(struct se_cmd *cmd, int remove) in transport_cmd_finish_abort() 668 struct se_cmd *cmd = container_of(work, struct se_cmd, work); in target_complete_failure_work() 678 static unsigned char *transport_get_sense_buffer(struct se_cmd *cmd) in transport_get_sense_buffer() [all …]
|
D | target_core_user.c | 117 struct se_cmd *se_cmd; member 154 static struct tcmu_cmd *tcmu_alloc_cmd(struct se_cmd *se_cmd) in tcmu_alloc_cmd() argument 156 struct se_device *se_dev = se_cmd->se_dev; in tcmu_alloc_cmd() 165 tcmu_cmd->se_cmd = se_cmd; in tcmu_alloc_cmd() 167 tcmu_cmd->data_length = se_cmd->data_length; in tcmu_alloc_cmd() 273 struct se_cmd *se_cmd = tcmu_cmd->se_cmd; in tcmu_queue_cmd_ring() local 295 req.iov[se_cmd->t_data_nents + 2]), in tcmu_queue_cmd_ring() 298 + round_up(scsi_command_size(se_cmd->t_task_cdb), TCMU_OP_ALIGN_SIZE); in tcmu_queue_cmd_ring() 363 for_each_sg(se_cmd->t_data_sg, sg, se_cmd->t_data_nents, i) { in tcmu_queue_cmd_ring() 369 if (tcmu_cmd->se_cmd->data_direction == DMA_TO_DEVICE) { in tcmu_queue_cmd_ring() [all …]
|
D | target_core_pr.h | 55 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 *);
|
D | target_core_internal.h | 49 struct list_head *, struct se_cmd *); 70 void transport_cmd_finish_abort(struct se_cmd *, int); 71 unsigned char *transport_dump_cmd_direction(struct se_cmd *); 79 bool target_stop_cmd(struct se_cmd *cmd, unsigned long *flags); 81 void transport_send_task_abort(struct se_cmd *); 82 sense_reason_t target_cmd_size_check(struct se_cmd *cmd, unsigned int size);
|
D | target_core_device.c | 59 transport_lookup_cmd_lun(struct se_cmd *se_cmd, u32 unpacked_lun) in transport_lookup_cmd_lun() argument 62 struct se_session *se_sess = se_cmd->se_sess; in transport_lookup_cmd_lun() 70 se_cmd->se_deve = se_sess->se_node_acl->device_list[unpacked_lun]; in transport_lookup_cmd_lun() 71 if (se_cmd->se_deve->lun_flags & TRANSPORT_LUNFLAGS_INITIATOR_ACCESS) { in transport_lookup_cmd_lun() 72 struct se_dev_entry *deve = se_cmd->se_deve; in transport_lookup_cmd_lun() 76 if ((se_cmd->data_direction == DMA_TO_DEVICE) && in transport_lookup_cmd_lun() 80 se_cmd->se_tfo->get_fabric_name(), in transport_lookup_cmd_lun() 86 if (se_cmd->data_direction == DMA_TO_DEVICE) in transport_lookup_cmd_lun() 87 deve->write_bytes += se_cmd->data_length; in transport_lookup_cmd_lun() 88 else if (se_cmd->data_direction == DMA_FROM_DEVICE) in transport_lookup_cmd_lun() [all …]
|
D | target_core_alua.h | 92 extern sense_reason_t target_emulate_report_target_port_groups(struct se_cmd *); 93 extern sense_reason_t target_emulate_set_target_port_groups(struct se_cmd *); 94 extern sense_reason_t target_emulate_report_referrals(struct se_cmd *); 95 extern int core_alua_check_nonop_delay(struct se_cmd *); 159 extern sense_reason_t target_alua_state_check(struct se_cmd *cmd);
|
D | target_core_spc.c | 70 spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_inquiry_std() 131 spc_emulate_evpd_80(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_80() 180 spc_emulate_evpd_83(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_83() 461 spc_emulate_evpd_86(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_86() 496 spc_emulate_evpd_b0(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_b0() 583 spc_emulate_evpd_b1(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_b1() 596 spc_emulate_evpd_b2(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_b2() 648 spc_emulate_evpd_b3(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_evpd_b3() 661 spc_emulate_evpd_00(struct se_cmd *cmd, unsigned char *buf); 665 sense_reason_t (*emulate)(struct se_cmd *, unsigned char *); [all …]
|
D | target_core_ua.h | 30 extern sense_reason_t target_scsi3_ua_check(struct se_cmd *); 33 extern void core_scsi3_ua_for_check_condition(struct se_cmd *, u8 *, u8 *); 34 extern int core_scsi3_ua_clear_for_request_sense(struct se_cmd *,
|
D | target_core_xcopy.h | 16 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 *);
|
D | target_core_sbc.c | 40 sbc_check_prot(struct se_device *, struct se_cmd *, unsigned char *, u32, bool); 43 sbc_emulate_readcapacity(struct se_cmd *cmd) in sbc_emulate_readcapacity() 92 sbc_emulate_readcapacity_16(struct se_cmd *cmd) in sbc_emulate_readcapacity_16() 156 sector_t sbc_get_write_same_sectors(struct se_cmd *cmd) in sbc_get_write_same_sectors() 180 sbc_emulate_noop(struct se_cmd *cmd) in sbc_emulate_noop() 186 static inline u32 sbc_get_size(struct se_cmd *cmd, u32 sectors) in sbc_get_size() 264 sbc_setup_write_same(struct se_cmd *cmd, unsigned char *flags, struct sbc_ops *ops) in sbc_setup_write_same() 324 static sense_reason_t xdreadwrite_callback(struct se_cmd *cmd, bool success, in xdreadwrite_callback() 383 sbc_execute_rw(struct se_cmd *cmd) in sbc_execute_rw() 389 static sense_reason_t compare_and_write_post(struct se_cmd *cmd, bool success, in compare_and_write_post() [all …]
|
D | target_core_iblock.c | 292 static void iblock_complete_cmd(struct se_cmd *cmd) in iblock_complete_cmd() 311 struct se_cmd *cmd = bio->bi_private; in iblock_bio_done() 336 iblock_get_bio(struct se_cmd *cmd, sector_t lba, u32 sg_num) in iblock_get_bio() 375 struct se_cmd *cmd = bio->bi_private; in iblock_end_io_flush() 395 iblock_execute_sync_cache(struct se_cmd *cmd) in iblock_execute_sync_cache() 418 iblock_do_unmap(struct se_cmd *cmd, void *priv, in iblock_do_unmap() 434 iblock_execute_unmap(struct se_cmd *cmd) in iblock_execute_unmap() 442 iblock_execute_write_same_unmap(struct se_cmd *cmd) in iblock_execute_write_same_unmap() 458 iblock_execute_write_same(struct se_cmd *cmd) in iblock_execute_write_same() 630 iblock_alloc_bip(struct se_cmd *cmd, struct bio *bio) in iblock_alloc_bip() [all …]
|
D | target_core_file.c | 261 static int fd_do_prot_rw(struct se_cmd *cmd, struct fd_prot *fd_prot, in fd_do_prot_rw() 319 static int fd_do_rw(struct se_cmd *cmd, struct scatterlist *sgl, in fd_do_rw() 384 fd_execute_sync_cache(struct se_cmd *cmd) in fd_execute_sync_cache() 429 fd_execute_write_same(struct se_cmd *cmd) in fd_execute_write_same() 516 fd_do_prot_unmap(struct se_cmd *cmd, sector_t lba, sector_t nolb) in fd_do_prot_unmap() 536 fd_do_unmap(struct se_cmd *cmd, void *priv, sector_t lba, sector_t nolb) in fd_do_unmap() 580 fd_execute_write_same_unmap(struct se_cmd *cmd) in fd_execute_write_same_unmap() 603 fd_execute_unmap(struct se_cmd *cmd) in fd_execute_unmap() 611 fd_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, in fd_execute_rw() 916 fd_parse_cdb(struct se_cmd *cmd) in fd_parse_cdb()
|
D | target_core_ua.c | 41 target_scsi3_ua_check(struct se_cmd *cmd) in target_scsi3_ua_check() 196 struct se_cmd *cmd, in core_scsi3_ua_for_check_condition() 265 struct se_cmd *cmd, in core_scsi3_ua_clear_for_request_sense()
|
D | target_core_pr.c | 98 target_scsi2_reservation_check(struct se_cmd *cmd) in target_scsi2_reservation_check() 130 static int target_check_scsi2_reservation_conflict(struct se_cmd *cmd) in target_check_scsi2_reservation_conflict() 202 target_scsi2_reservation_release(struct se_cmd *cmd) in target_scsi2_reservation_release() 247 target_scsi2_reservation_reserve(struct se_cmd *cmd) in target_scsi2_reservation_reserve() 318 struct se_cmd *cmd, in core_scsi3_pr_seq_non_holder() 573 target_scsi3_pr_reservation_check(struct se_cmd *cmd) in target_scsi3_pr_reservation_check() 1434 struct se_cmd *cmd, in core_scsi3_decode_spec_i_port() 2001 core_scsi3_emulate_pro_register(struct se_cmd *cmd, u64 res_key, u64 sa_res_key, in core_scsi3_emulate_pro_register() 2228 core_scsi3_pro_reserve(struct se_cmd *cmd, int type, int scope, u64 res_key) in core_scsi3_pro_reserve() 2384 core_scsi3_emulate_pro_reserve(struct se_cmd *cmd, int type, int scope, in core_scsi3_emulate_pro_reserve() [all …]
|
D | target_core_alua.c | 66 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() 285 target_emulate_set_target_port_groups(struct se_cmd *cmd) in target_emulate_set_target_port_groups() 456 static inline void set_ascq(struct se_cmd *cmd, u8 alua_ascq) in set_ascq() 473 struct se_cmd *cmd, in core_alua_state_nonoptimized() 487 struct se_cmd *cmd, in core_alua_state_lba_dependent() 561 struct se_cmd *cmd, in core_alua_state_standby() 618 struct se_cmd *cmd, in core_alua_state_unavailable() 658 struct se_cmd *cmd, in core_alua_state_transition() 695 target_alua_state_check(struct se_cmd *cmd) in target_alua_state_check() [all …]
|
D | target_core_rd.c | 406 typedef sense_reason_t (*dif_verify)(struct se_cmd *, sector_t, unsigned int, 409 static sense_reason_t rd_do_prot_rw(struct se_cmd *cmd, dif_verify dif_verify) in rd_do_prot_rw() 477 rd_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, in rd_execute_rw() 692 rd_parse_cdb(struct se_cmd *cmd) in rd_parse_cdb()
|
D | target_core_pscsi.c | 61 static sense_reason_t pscsi_execute_cmd(struct se_cmd *cmd); 619 static void pscsi_transport_complete(struct se_cmd *cmd, struct scatterlist *sg, in pscsi_transport_complete() 873 pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, in pscsi_map_sg() 977 pscsi_parse_cdb(struct se_cmd *cmd) in pscsi_parse_cdb() 986 pscsi_execute_cmd(struct se_cmd *cmd) in pscsi_execute_cmd() 1092 struct se_cmd *cmd = req->end_io_data; in pscsi_req_done()
|
/linux-4.1.27/include/target/ |
D | target_core_fabric.h | 51 int (*check_stop_free)(struct se_cmd *); 52 void (*release_cmd)(struct se_cmd *); 66 int (*write_pending)(struct se_cmd *); 67 int (*write_pending_status)(struct se_cmd *); 69 u32 (*get_task_tag)(struct se_cmd *); 70 int (*get_cmd_state)(struct se_cmd *); 71 int (*queue_data_in)(struct se_cmd *); 72 int (*queue_status)(struct se_cmd *); 73 void (*queue_tm_rsp)(struct se_cmd *); 74 void (*aborted_task)(struct se_cmd *); [all …]
|
D | target_core_backend.h | 37 void (*transport_complete)(struct se_cmd *cmd, 41 sense_reason_t (*parse_cdb)(struct se_cmd *cmd); 49 unsigned char *(*get_sense_buffer)(struct se_cmd *); 59 sense_reason_t (*execute_rw)(struct se_cmd *cmd, struct scatterlist *, 61 sense_reason_t (*execute_sync_cache)(struct se_cmd *cmd); 62 sense_reason_t (*execute_write_same)(struct se_cmd *cmd); 63 sense_reason_t (*execute_write_same_unmap)(struct se_cmd *cmd); 64 sense_reason_t (*execute_unmap)(struct se_cmd *cmd); 70 void target_complete_cmd(struct se_cmd *, u8); 71 void target_complete_cmd_with_length(struct se_cmd *, u8, int); [all …]
|
D | target_core_base.h | 253 struct se_cmd; 437 struct se_cmd *task_cmd; 482 struct se_cmd { struct 523 sense_reason_t (*execute_cmd)(struct se_cmd *); argument 524 sense_reason_t (*execute_rw)(struct se_cmd *, struct scatterlist *, argument 526 sense_reason_t (*transport_complete_callback)(struct se_cmd *, bool, int *); argument
|
/linux-4.1.27/drivers/target/tcm_fc/ |
D | tfc_cmd.c | 55 struct se_cmd *se_cmd; in _ft_dump_cmd() local 59 se_cmd = &cmd->se_cmd; in _ft_dump_cmd() 61 caller, cmd, cmd->sess, cmd->seq, se_cmd); in _ft_dump_cmd() 64 caller, cmd, se_cmd->t_data_nents, in _ft_dump_cmd() 65 se_cmd->data_length, se_cmd->se_cmd_flags); in _ft_dump_cmd() 67 for_each_sg(se_cmd->t_data_sg, sg, se_cmd->t_data_nents, count) in _ft_dump_cmd() 103 percpu_ida_free(&sess->se_sess->sess_tag_pool, cmd->se_cmd.map_tag); in ft_free_cmd() 107 void ft_release_cmd(struct se_cmd *se_cmd) in ft_release_cmd() argument 109 struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd); in ft_release_cmd() 114 int ft_check_stop_free(struct se_cmd *se_cmd) in ft_check_stop_free() argument [all …]
|
D | tcm_fc.h | 118 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 u32 ft_get_task_tag(struct se_cmd *); 161 int ft_get_cmd_state(struct se_cmd *); 162 void ft_queue_tm_resp(struct se_cmd *); [all …]
|
D | tfc_io.c | 60 int ft_queue_data_in(struct se_cmd *se_cmd) in ft_queue_data_in() argument 62 struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd); in ft_queue_data_in() 86 if (se_cmd->scsi_status == SAM_STAT_TASK_SET_FULL) in ft_queue_data_in() 93 remaining = se_cmd->data_length; in ft_queue_data_in() 98 BUG_ON(remaining && !se_cmd->t_data_sg); in ft_queue_data_in() 100 sg = se_cmd->t_data_sg; in ft_queue_data_in() 197 se_cmd->scsi_status = SAM_STAT_TASK_SET_FULL; in ft_queue_data_in() 202 return ft_queue_status(se_cmd); in ft_queue_data_in() 209 target_execute_cmd(&cmd->se_cmd); in ft_execute_work() 217 struct se_cmd *se_cmd = &cmd->se_cmd; in ft_recv_write_data() local [all …]
|
/linux-4.1.27/drivers/scsi/qla2xxx/ |
D | tcm_qla2xxx.c | 382 transport_generic_free_cmd(&mcmd->se_cmd, 0); in tcm_qla2xxx_complete_mcmd() 405 transport_generic_free_cmd(&cmd->se_cmd, 0); in tcm_qla2xxx_complete_free() 423 static int tcm_qla2xxx_check_stop_free(struct se_cmd *se_cmd) in tcm_qla2xxx_check_stop_free() argument 427 if ((se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB) == 0) { in tcm_qla2xxx_check_stop_free() 428 cmd = container_of(se_cmd, struct qla_tgt_cmd, se_cmd); in tcm_qla2xxx_check_stop_free() 432 return target_put_sess_cmd(se_cmd); in tcm_qla2xxx_check_stop_free() 438 static void tcm_qla2xxx_release_cmd(struct se_cmd *se_cmd) in tcm_qla2xxx_release_cmd() argument 442 if (se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB) { in tcm_qla2xxx_release_cmd() 443 struct qla_tgt_mgmt_cmd *mcmd = container_of(se_cmd, in tcm_qla2xxx_release_cmd() 444 struct qla_tgt_mgmt_cmd, se_cmd); in tcm_qla2xxx_release_cmd() [all …]
|
D | qla_target.c | 1367 struct se_cmd *se_cmd; in __qlt_24xx_handle_abts() local 1373 list_for_each_entry(se_cmd, &se_sess->sess_cmd_list, se_cmd_list) { in __qlt_24xx_handle_abts() 1375 container_of(se_cmd, struct qla_tgt_cmd, se_cmd); in __qlt_24xx_handle_abts() 1583 if (mcmd->se_cmd.se_tmr_req->function == TMR_ABORT_TASK) in qlt_xmit_tm_rsp() 1618 if (cmd->se_cmd.prot_op == TARGET_PROT_NORMAL) { in qlt_pci_map_calc_cnt() 1629 if ((cmd->se_cmd.prot_op == TARGET_PROT_DIN_INSERT) || in qlt_pci_map_calc_cnt() 1630 (cmd->se_cmd.prot_op == TARGET_PROT_DOUT_STRIP)) { in qlt_pci_map_calc_cnt() 1644 if ((cmd->se_cmd.prot_op == TARGET_PROT_DIN_INSERT) || in qlt_pci_map_calc_cnt() 1645 (cmd->se_cmd.prot_op == TARGET_PROT_DOUT_STRIP)) { in qlt_pci_map_calc_cnt() 1925 struct se_cmd *se_cmd = &cmd->se_cmd; in qlt_pre_xmit_response() local [all …]
|
D | qla_target.h | 934 struct se_cmd se_cmd; member 1017 struct se_cmd se_cmd; member
|
/linux-4.1.27/drivers/target/loopback/ |
D | tcm_loop.c | 51 static int tcm_loop_queue_status(struct se_cmd *se_cmd); 56 static int tcm_loop_check_stop_free(struct se_cmd *se_cmd) in tcm_loop_check_stop_free() argument 63 if (se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB) in tcm_loop_check_stop_free() 69 transport_generic_free_cmd(se_cmd, 0); in tcm_loop_check_stop_free() 73 static void tcm_loop_release_cmd(struct se_cmd *se_cmd) in tcm_loop_release_cmd() argument 75 struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, in tcm_loop_release_cmd() 116 struct se_cmd *se_cmd = &tl_cmd->tl_se_cmd; in tcm_loop_submission_work() local 152 se_cmd->se_cmd_flags |= SCF_BIDI; in tcm_loop_submission_work() 159 se_cmd->prot_pto = true; in tcm_loop_submission_work() 168 rc = target_submit_cmd_map_sgls(se_cmd, tl_nexus->se_sess, sc->cmnd, in tcm_loop_submission_work() [all …]
|
D | tcm_loop.h | 18 struct se_cmd tl_se_cmd;
|
/linux-4.1.27/drivers/usb/gadget/legacy/ |
D | tcm_usb_gadget.c | 163 if (cmd->se_cmd.scsi_status == SAM_STAT_GOOD) { in bot_send_status() 216 struct se_cmd *se_cmd = &cmd->se_cmd; in bot_send_read_response() local 227 cmd->data_buf = kmalloc(se_cmd->data_length, GFP_ATOMIC); in bot_send_read_response() 231 sg_copy_to_buffer(se_cmd->t_data_sg, in bot_send_read_response() 232 se_cmd->t_data_nents, in bot_send_read_response() 234 se_cmd->data_length); in bot_send_read_response() 239 fu->bot_req_in->num_sgs = se_cmd->t_data_nents; in bot_send_read_response() 240 fu->bot_req_in->sg = se_cmd->t_data_sg; in bot_send_read_response() 244 fu->bot_req_in->length = se_cmd->data_length; in bot_send_read_response() 258 struct se_cmd *se_cmd = &cmd->se_cmd; in bot_send_write_request() local [all …]
|
D | tcm_usb_gadget.h | 80 struct se_cmd se_cmd; member
|
/linux-4.1.27/drivers/target/iscsi/ |
D | iscsi_target_tmr.c | 45 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 …]
|
D | iscsi_target_seq_pdu_list.c | 223 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 …]
|
D | iscsi_target_configfs.c | 1738 static u32 iscsi_get_task_tag(struct se_cmd *se_cmd) in iscsi_get_task_tag() argument 1740 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in iscsi_get_task_tag() 1746 static int iscsi_get_cmd_state(struct se_cmd *se_cmd) in iscsi_get_cmd_state() argument 1748 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in iscsi_get_cmd_state() 1772 static int lio_queue_data_in(struct se_cmd *se_cmd) in lio_queue_data_in() argument 1774 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in lio_queue_data_in() 1782 static int lio_write_pending(struct se_cmd *se_cmd) in lio_write_pending() argument 1784 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in lio_write_pending() 1793 static int lio_write_pending_status(struct se_cmd *se_cmd) in lio_write_pending_status() argument 1795 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); in lio_write_pending_status() [all …]
|
D | iscsi_target_util.c | 168 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 …]
|
D | iscsi_target_erl1.c | 413 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 …]
|
D | iscsi_target.c | 713 if (cmd->se_cmd.se_tfo != NULL) { in iscsit_add_reject_from_cmd() 715 target_put_sess_cmd(&cmd->se_cmd); in iscsit_add_reject_from_cmd() 748 sg = &cmd->se_cmd.t_data_sg[data_offset / PAGE_SIZE]; in iscsit_map_iovec() 814 u32 iov_count = max(1UL, DIV_ROUND_UP(cmd->se_cmd.data_length, PAGE_SIZE)); in iscsit_allocate_iovecs() 991 transport_init_se_cmd(&cmd->se_cmd, &iscsi_ops, in iscsit_setup_scsi_cmd() 1001 target_get_sess_cmd(&cmd->se_cmd, true); in iscsit_setup_scsi_cmd() 1003 cmd->sense_reason = transport_lookup_cmd_lun(&cmd->se_cmd, in iscsit_setup_scsi_cmd() 1008 cmd->sense_reason = target_setup_cmd_from_cdb(&cmd->se_cmd, hdr->cdb); in iscsit_setup_scsi_cmd() 1031 core_alua_check_nonop_delay(&cmd->se_cmd); in iscsit_setup_scsi_cmd() 1067 target_put_sess_cmd(&cmd->se_cmd); in iscsit_process_scsi_cmd() [all …]
|
D | iscsi_target_erl0.c | 48 ((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 …]
|
D | iscsi_target_datain_values.c | 111 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()
|
D | iscsi_target_erl2.c | 401 transport_wait_for_tasks(&cmd->se_cmd); in iscsit_prepare_cmds_for_realligance()
|
/linux-4.1.27/drivers/xen/ |
D | xen-scsiback.c | 141 struct se_cmd se_cmd; member 381 resid = pending_req->se_cmd.residual_count; in scsiback_cmd_done() 394 struct se_cmd *se_cmd = &pending_req->se_cmd; in scsiback_cmd_exec() local 400 memset(se_cmd, 0, sizeof(*se_cmd)); in scsiback_cmd_exec() 403 rc = target_submit_cmd_map_sgls(se_cmd, sess, pending_req->cmnd, in scsiback_cmd_exec() 410 transport_send_check_condition_and_sense(se_cmd, in scsiback_cmd_exec() 412 transport_generic_free_cmd(se_cmd, 0); in scsiback_cmd_exec() 597 struct se_cmd *se_cmd = &pending_req->se_cmd; in scsiback_device_action() local 606 transport_init_se_cmd(se_cmd, tpg->se_tpg.se_tpg_tfo, in scsiback_device_action() 610 rc = core_tmr_alloc_req(se_cmd, tmr, act, GFP_KERNEL); in scsiback_device_action() [all …]
|
/linux-4.1.27/drivers/infiniband/ulp/isert/ |
D | ib_isert.c | 71 isert_prot_cmd(struct isert_conn *conn, struct se_cmd *cmd) in isert_prot_cmd() 1329 sg = &cmd->se_cmd.t_data_sg[0]; in isert_handle_scsi_cmd() 1339 if (cmd->write_data_done == cmd->se_cmd.data_length) { in isert_handle_scsi_cmd() 1352 target_put_sess_cmd(&cmd->se_cmd); in isert_handle_scsi_cmd() 1385 cmd->se_cmd.data_length); in isert_handle_iscsi_dataout() 1388 sg_start = &cmd->se_cmd.t_data_sg[sg_off]; in isert_handle_iscsi_dataout() 1774 cmd->se_cmd.t_state == TRANSPORT_WRITE_PENDING) { in isert_put_cmd() 1775 struct se_cmd *se_cmd = &cmd->se_cmd; in isert_put_cmd() local 1777 target_put_sess_cmd(se_cmd); in isert_put_cmd() 1782 transport_generic_free_cmd(&cmd->se_cmd, 0); in isert_put_cmd() [all …]
|
/linux-4.1.27/drivers/target/sbp/ |
D | sbp_target.c | 1237 if (target_submit_cmd(&req->se_cmd, sess->se_sess, req->cmd_buf, in sbp_handle_command() 1269 if (req->se_cmd.data_direction == DMA_FROM_DEVICE) { in sbp_rw_data() 1303 length = req->se_cmd.data_length; in sbp_rw_data() 1306 sg_miter_start(&iter, req->se_cmd.t_data_sg, req->se_cmd.t_data_nents, in sbp_rw_data() 1370 struct se_cmd *se_cmd = &req->se_cmd; in sbp_sense_mangle() local 1374 WARN_ON(se_cmd->scsi_sense_length < 18); in sbp_sense_mangle() 1400 status[0] |= se_cmd->scsi_status & 0x3f;/* status */ in sbp_sense_mangle() 1405 status[2] = se_cmd->scsi_asc; /* sense_code */ in sbp_sense_mangle() 1406 status[3] = se_cmd->scsi_ascq; /* sense_qualifier */ in sbp_sense_mangle() 1437 struct se_cmd *se_cmd = &req->se_cmd; in sbp_send_sense() local [all …]
|
D | sbp_target.h | 225 struct se_cmd se_cmd; member
|
/linux-4.1.27/drivers/vhost/ |
D | scsi.c | 100 struct se_cmd tvc_se_cmd; 470 static void vhost_scsi_release_cmd(struct se_cmd *se_cmd) in vhost_scsi_release_cmd() argument 472 struct vhost_scsi_cmd *tv_cmd = container_of(se_cmd, in vhost_scsi_release_cmd() 487 percpu_ida_free(&se_sess->sess_tag_pool, se_cmd->map_tag); in vhost_scsi_release_cmd() 505 static int vhost_scsi_write_pending(struct se_cmd *se_cmd) in vhost_scsi_write_pending() argument 508 target_execute_cmd(se_cmd); in vhost_scsi_write_pending() 512 static int vhost_scsi_write_pending_status(struct se_cmd *se_cmd) in vhost_scsi_write_pending_status() argument 522 static u32 vhost_scsi_get_task_tag(struct se_cmd *se_cmd) in vhost_scsi_get_task_tag() argument 527 static int vhost_scsi_get_cmd_state(struct se_cmd *se_cmd) in vhost_scsi_get_cmd_state() argument 541 static int vhost_scsi_queue_data_in(struct se_cmd *se_cmd) in vhost_scsi_queue_data_in() argument [all …]
|
/linux-4.1.27/drivers/infiniband/ulp/srpt/ |
D | ib_srpt.c | 98 static int srpt_queue_status(struct se_cmd *cmd); 1082 struct se_cmd *cmd; in srpt_map_sg_to_ib_sge() 1390 struct se_cmd *cmd; in srpt_handle_send_err_comp() 1475 struct se_cmd *cmd; in srpt_handle_rdma_err_comp() 1677 static int srpt_check_stop_free(struct se_cmd *cmd) in srpt_check_stop_free() 1692 struct se_cmd *cmd; in srpt_handle_cmd() 1776 struct se_cmd *cmd; in srpt_handle_tsk_mgmt() 2886 static int srpt_write_pending_status(struct se_cmd *se_cmd) in srpt_write_pending_status() argument 2890 ioctx = container_of(se_cmd, struct srpt_send_ioctx, cmd); in srpt_write_pending_status() 2897 static int srpt_write_pending(struct se_cmd *se_cmd) in srpt_write_pending() argument [all …]
|
D | ib_srpt.h | 239 struct se_cmd cmd;
|
/linux-4.1.27/include/trace/events/ |
D | target.h | 133 TP_PROTO(struct se_cmd *cmd), 168 TP_PROTO(struct se_cmd *cmd),
|
/linux-4.1.27/include/target/iscsi/ |
D | iscsi_target_core.h | 487 struct se_cmd se_cmd; member
|