Symbol: tcmu_cmd
drivers/target/target_core_user.c
1012
static int queue_cmd_ring(struct tcmu_cmd *tcmu_cmd, sense_reason_t *scsi_err)
drivers/target/target_core_user.c
1014
struct tcmu_dev *udev = tcmu_cmd->tcmu_dev;
drivers/target/target_core_user.c
1015
struct se_cmd *se_cmd = tcmu_cmd->se_cmd;
drivers/target/target_core_user.c
1025
size_t data_length = (size_t)tcmu_cmd->dbi_cnt * blk_size;
drivers/target/target_core_user.c
1049
iov_cnt = tcmu_alloc_data_space(udev, tcmu_cmd, &iov_bidi_cnt);
drivers/target/target_core_user.c
1058
command_size = tcmu_cmd_get_cmd_size(tcmu_cmd, base_command_size);
drivers/target/target_core_user.c
1063
tcmu_cmd_free_data(tcmu_cmd, tcmu_cmd->dbi_cur);
drivers/target/target_core_user.c
1075
if (xa_alloc(&udev->commands, &cmd_id, tcmu_cmd, XA_LIMIT(1, 0xffff),
drivers/target/target_core_user.c
1079
tcmu_cmd_free_data(tcmu_cmd, tcmu_cmd->dbi_cnt);
drivers/target/target_core_user.c
1083
tcmu_cmd->cmd_id = cmd_id;
drivers/target/target_core_user.c
1085
pr_debug("allocated cmd id %u for cmd %p dev %s\n", tcmu_cmd->cmd_id,
drivers/target/target_core_user.c
1086
tcmu_cmd, udev->name);
drivers/target/target_core_user.c
1095
tcmu_cmd_reset_dbi_cur(tcmu_cmd);
drivers/target/target_core_user.c
1100
scatter_data_area(udev, tcmu_cmd, &iov);
drivers/target/target_core_user.c
1102
tcmu_setup_iovs(udev, tcmu_cmd, &iov, se_cmd->data_length);
drivers/target/target_core_user.c
1109
tcmu_setup_iovs(udev, tcmu_cmd, &iov, tcmu_cmd->data_len_bidi);
drivers/target/target_core_user.c
1113
tcmu_setup_cmd_timer(tcmu_cmd, udev->cmd_time_out, &udev->cmd_timer);
drivers/target/target_core_user.c
1115
entry->hdr.cmd_id = tcmu_cmd->cmd_id;
drivers/target/target_core_user.c
1128
list_add_tail(&tcmu_cmd->queue_entry, &udev->inflight_queue);
drivers/target/target_core_user.c
1136
tcmu_cmd_free_data(tcmu_cmd, tcmu_cmd->dbi_cur);
drivers/target/target_core_user.c
1137
tcmu_cmd_reset_dbi_cur(tcmu_cmd);
drivers/target/target_core_user.c
1140
if (add_to_qfull_queue(tcmu_cmd)) {
drivers/target/target_core_user.c
1207
struct tcmu_cmd *tcmu_cmd;
drivers/target/target_core_user.c
1211
tcmu_cmd = tcmu_alloc_cmd(se_cmd);
drivers/target/target_core_user.c
1212
if (!tcmu_cmd)
drivers/target/target_core_user.c
1217
ret = queue_cmd_ring(tcmu_cmd, &scsi_ret);
drivers/target/target_core_user.c
1219
tcmu_free_cmd(tcmu_cmd);
drivers/target/target_core_user.c
1221
se_cmd->priv = tcmu_cmd;
drivers/target/target_core_user.c
1229
struct tcmu_cmd *cmd;
drivers/target/target_core_user.c
1232
cmd = list_first_entry(queue, struct tcmu_cmd, queue_entry);
drivers/target/target_core_user.c
1260
struct tcmu_cmd *cmd;
drivers/target/target_core_user.c
1320
static bool tcmu_handle_completion(struct tcmu_cmd *cmd,
drivers/target/target_core_user.c
1446
struct tcmu_cmd *cmd;
drivers/target/target_core_user.c
1518
static void tcmu_check_expired_ring_cmd(struct tcmu_cmd *cmd)
drivers/target/target_core_user.c
1537
static void tcmu_check_expired_queue_cmd(struct tcmu_cmd *cmd)
drivers/target/target_core_user.c
1652
static int tcmu_check_and_free_pending_cmd(struct tcmu_cmd *cmd)
drivers/target/target_core_user.c
1716
struct tcmu_cmd *cmd;
drivers/target/target_core_user.c
1752
struct tcmu_cmd *tcmu_cmd, *tmp_cmd;
drivers/target/target_core_user.c
1764
list_for_each_entry_safe(tcmu_cmd, tmp_cmd, &cmds, queue_entry) {
drivers/target/target_core_user.c
1765
list_del_init(&tcmu_cmd->queue_entry);
drivers/target/target_core_user.c
1768
tcmu_cmd, udev->name);
drivers/target/target_core_user.c
1778
tcmu_cmd->se_cmd->priv = NULL;
drivers/target/target_core_user.c
1779
target_complete_cmd(tcmu_cmd->se_cmd, SAM_STAT_BUSY);
drivers/target/target_core_user.c
1780
tcmu_free_cmd(tcmu_cmd);
drivers/target/target_core_user.c
1784
ret = queue_cmd_ring(tcmu_cmd, &scsi_ret);
drivers/target/target_core_user.c
1787
tcmu_cmd, udev->name, scsi_ret);
drivers/target/target_core_user.c
1792
tcmu_cmd->se_cmd->priv = NULL;
drivers/target/target_core_user.c
1793
target_complete_cmd(tcmu_cmd->se_cmd,
drivers/target/target_core_user.c
1795
tcmu_free_cmd(tcmu_cmd);
drivers/target/target_core_user.c
1963
struct tcmu_cmd *cmd;
drivers/target/target_core_user.c
2365
struct tcmu_cmd *cmd;
drivers/target/target_core_user.c
3088
struct tcmu_cmd *cmd;
drivers/target/target_core_user.c
3266
struct tcmu_cmd *cmd, *tmp_cmd;
drivers/target/target_core_user.c
3320
sizeof(struct tcmu_cmd),
drivers/target/target_core_user.c
3321
__alignof__(struct tcmu_cmd),
drivers/target/target_core_user.c
497
static void tcmu_cmd_free_data(struct tcmu_cmd *tcmu_cmd, uint32_t len)
drivers/target/target_core_user.c
499
struct tcmu_dev *udev = tcmu_cmd->tcmu_dev;
drivers/target/target_core_user.c
503
clear_bit(tcmu_cmd->dbi[i], udev->data_bitmap);
drivers/target/target_core_user.c
507
struct tcmu_cmd *tcmu_cmd,
drivers/target/target_core_user.c
546
tcmu_cmd_set_dbi(tcmu_cmd, dbi);
drivers/target/target_core_user.c
555
struct tcmu_cmd *tcmu_cmd, int length)
drivers/target/target_core_user.c
564
dbi = tcmu_get_empty_block(udev, tcmu_cmd, dbi, blk_data_len,
drivers/target/target_core_user.c
572
static inline void tcmu_free_cmd(struct tcmu_cmd *tcmu_cmd)
drivers/target/target_core_user.c
574
kfree(tcmu_cmd->dbi);
drivers/target/target_core_user.c
575
kmem_cache_free(tcmu_cmd_cache, tcmu_cmd);
drivers/target/target_core_user.c
578
static inline void tcmu_cmd_set_block_cnts(struct tcmu_cmd *cmd)
drivers/target/target_core_user.c
596
static int new_block_to_iov(struct tcmu_dev *udev, struct tcmu_cmd *cmd,
drivers/target/target_core_user.c
622
static void tcmu_setup_iovs(struct tcmu_dev *udev, struct tcmu_cmd *cmd,
drivers/target/target_core_user.c
633
static struct tcmu_cmd *tcmu_alloc_cmd(struct se_cmd *se_cmd)
drivers/target/target_core_user.c
637
struct tcmu_cmd *tcmu_cmd;
drivers/target/target_core_user.c
639
tcmu_cmd = kmem_cache_zalloc(tcmu_cmd_cache, GFP_NOIO);
drivers/target/target_core_user.c
640
if (!tcmu_cmd)
drivers/target/target_core_user.c
643
INIT_LIST_HEAD(&tcmu_cmd->queue_entry);
drivers/target/target_core_user.c
644
tcmu_cmd->se_cmd = se_cmd;
drivers/target/target_core_user.c
645
tcmu_cmd->tcmu_dev = udev;
drivers/target/target_core_user.c
647
tcmu_cmd_set_block_cnts(tcmu_cmd);
drivers/target/target_core_user.c
648
tcmu_cmd->dbi = kcalloc(tcmu_cmd->dbi_cnt, sizeof(uint32_t),
drivers/target/target_core_user.c
650
if (!tcmu_cmd->dbi) {
drivers/target/target_core_user.c
651
kmem_cache_free(tcmu_cmd_cache, tcmu_cmd);
drivers/target/target_core_user.c
655
return tcmu_cmd;
drivers/target/target_core_user.c
703
struct tcmu_cmd *tcmu_cmd, uint32_t direction,
drivers/target/target_core_user.c
724
dbi = new_block_to_iov(udev, tcmu_cmd, iov, dbi,
drivers/target/target_core_user.c
727
dbi = tcmu_cmd_get_dbi(tcmu_cmd);
drivers/target/target_core_user.c
774
static void scatter_data_area(struct tcmu_dev *udev, struct tcmu_cmd *tcmu_cmd,
drivers/target/target_core_user.c
777
struct se_cmd *se_cmd = tcmu_cmd->se_cmd;
drivers/target/target_core_user.c
779
tcmu_copy_data(udev, tcmu_cmd, TCMU_SG_TO_DATA_AREA, se_cmd->t_data_sg,
drivers/target/target_core_user.c
783
static void gather_data_area(struct tcmu_dev *udev, struct tcmu_cmd *tcmu_cmd,
drivers/target/target_core_user.c
786
struct se_cmd *se_cmd = tcmu_cmd->se_cmd;
drivers/target/target_core_user.c
799
tcmu_cmd_set_dbi_cur(tcmu_cmd,
drivers/target/target_core_user.c
800
tcmu_cmd->dbi_cnt - tcmu_cmd->dbi_bidi_cnt);
drivers/target/target_core_user.c
806
tcmu_copy_data(udev, tcmu_cmd, TCMU_DATA_AREA_TO_SG, data_sg,
drivers/target/target_core_user.c
854
static int tcmu_alloc_data_space(struct tcmu_dev *udev, struct tcmu_cmd *cmd,
drivers/target/target_core_user.c
900
static inline size_t tcmu_cmd_get_cmd_size(struct tcmu_cmd *tcmu_cmd,
drivers/target/target_core_user.c
903
struct se_cmd *se_cmd = tcmu_cmd->se_cmd;
drivers/target/target_core_user.c
915
static void tcmu_setup_cmd_timer(struct tcmu_cmd *tcmu_cmd, unsigned int tmo,
drivers/target/target_core_user.c
921
tcmu_cmd->deadline = round_jiffies_up(jiffies + msecs_to_jiffies(tmo));
drivers/target/target_core_user.c
923
mod_timer(timer, tcmu_cmd->deadline);
drivers/target/target_core_user.c
925
pr_debug("Timeout set up for cmd %p, dev = %s, tmo = %lu\n", tcmu_cmd,
drivers/target/target_core_user.c
926
tcmu_cmd->tcmu_dev->name, tmo / MSEC_PER_SEC);
drivers/target/target_core_user.c
929
static int add_to_qfull_queue(struct tcmu_cmd *tcmu_cmd)
drivers/target/target_core_user.c
931
struct tcmu_dev *udev = tcmu_cmd->tcmu_dev;
drivers/target/target_core_user.c
947
tcmu_setup_cmd_timer(tcmu_cmd, tmo, &udev->qfull_timer);
drivers/target/target_core_user.c
949
list_add_tail(&tcmu_cmd->queue_entry, &udev->qfull_queue);
drivers/target/target_core_user.c
951
tcmu_cmd, udev->name);