Lines Matching defs:se_cmd

76 isert_prot_cmd(struct isert_conn *conn, struct se_cmd *cmd)
1065 data_len = cmd->se_cmd.data_length;
1068 cmd->se_cmd.se_cmd_flags |= SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC;
1082 sg_copy_from_buffer(cmd->se_cmd.t_data_sg, sg_nents,
1088 cmd->se_cmd.t_data_sg = &isert_cmd->sg;
1089 cmd->se_cmd.t_data_nents = 1;
1098 if (cmd->write_data_done == cmd->se_cmd.data_length) {
1111 target_put_sess_cmd(&cmd->se_cmd);
1144 cmd->se_cmd.data_length);
1147 sg_start = &cmd->se_cmd.t_data_sg[sg_off];
1411 struct se_cmd *se_cmd = &cmd->iscsit_cmd->se_cmd;
1412 enum dma_data_direction dir = target_reverse_dma_direction(se_cmd);
1417 if (isert_prot_cmd(conn, se_cmd)) {
1419 conn->cm_id->port_num, se_cmd->t_data_sg,
1420 se_cmd->t_data_nents, se_cmd->t_prot_sg,
1421 se_cmd->t_prot_nents, dir);
1424 se_cmd->t_data_sg, se_cmd->t_data_nents, dir);
1456 cmd->se_cmd.t_state == TRANSPORT_WRITE_PENDING) {
1457 struct se_cmd *se_cmd = &cmd->se_cmd;
1459 target_put_sess_cmd(se_cmd);
1464 transport_generic_free_cmd(&cmd->se_cmd, 0);
1472 transport_generic_free_cmd(&cmd->se_cmd, 0);
1490 * associated cmd->se_cmd needs to be released.
1492 if (cmd->se_cmd.se_tfo != NULL) {
1495 transport_generic_free_cmd(&cmd->se_cmd, 0);
1532 isert_check_pi_status(struct se_cmd *se_cmd, struct ib_mr *sig_mr)
1545 u32 block_size = se_cmd->se_dev->dev_attrib.block_size + 8;
1549 se_cmd->pi_err = TCM_LOGICAL_BLOCK_GUARD_CHECK_FAILED;
1552 se_cmd->pi_err = TCM_LOGICAL_BLOCK_REF_TAG_CHECK_FAILED;
1555 se_cmd->pi_err = TCM_LOGICAL_BLOCK_APP_TAG_CHECK_FAILED;
1560 se_cmd->sense_info = sec_offset_err + se_cmd->t_task_lba;
1565 (unsigned long long)se_cmd->sense_info,
1582 struct se_cmd *cmd = &isert_cmd->iscsit_cmd->se_cmd;
1625 struct se_cmd *se_cmd = &cmd->se_cmd;
1640 if (isert_prot_cmd(isert_conn, se_cmd))
1641 ret = isert_check_pi_status(se_cmd, isert_cmd->rw.reg->mr);
1653 * se_cmd->cmd_kref reference after T10-PI error, and handle
1657 transport_generic_request_failure(se_cmd, se_cmd->pi_err);
1659 target_execute_cmd(se_cmd);
1776 if (cmd->se_cmd.sense_buffer &&
1777 ((cmd->se_cmd.se_cmd_flags & SCF_TRANSPORT_TASK_SENSE) ||
1778 (cmd->se_cmd.se_cmd_flags & SCF_EMULATED_TASK_SENSE))) {
1784 put_unaligned_be16(cmd->se_cmd.scsi_sense_length,
1786 cmd->se_cmd.scsi_sense_length += sizeof(__be16);
1788 padding = -(cmd->se_cmd.scsi_sense_length) & 3;
1789 hton24(hdr->dlength, (u32)cmd->se_cmd.scsi_sense_length);
1790 pdu_len = cmd->se_cmd.scsi_sense_length + padding;
1983 isert_set_dif_domain(struct se_cmd *se_cmd, struct ib_sig_domain *domain)
1987 domain->sig.dif.pi_interval = se_cmd->se_dev->dev_attrib.block_size;
1988 domain->sig.dif.ref_tag = se_cmd->reftag_seed;
1992 * from se_cmd.
1997 if (se_cmd->prot_type == TARGET_DIF_TYPE1_PROT ||
1998 se_cmd->prot_type == TARGET_DIF_TYPE2_PROT)
2003 isert_set_sig_attrs(struct se_cmd *se_cmd, struct ib_sig_attrs *sig_attrs)
2007 switch (se_cmd->prot_op) {
2011 isert_set_dif_domain(se_cmd, &sig_attrs->wire);
2016 isert_set_dif_domain(se_cmd, &sig_attrs->mem);
2020 isert_set_dif_domain(se_cmd, &sig_attrs->wire);
2021 isert_set_dif_domain(se_cmd, &sig_attrs->mem);
2024 isert_err("Unsupported PI operation %d\n", se_cmd->prot_op);
2028 if (se_cmd->prot_checks & TARGET_DIF_CHECK_GUARD)
2030 if (se_cmd->prot_checks & TARGET_DIF_CHECK_APPTAG)
2032 if (se_cmd->prot_checks & TARGET_DIF_CHECK_REFTAG)
2042 struct se_cmd *se_cmd = &cmd->iscsit_cmd->se_cmd;
2043 enum dma_data_direction dir = target_reverse_dma_direction(se_cmd);
2062 if (isert_prot_cmd(conn, se_cmd)) {
2065 ret = isert_set_sig_attrs(se_cmd, &sig_attrs);
2071 se_cmd->t_data_sg, se_cmd->t_data_nents,
2072 se_cmd->t_prot_sg, se_cmd->t_prot_nents,
2076 se_cmd->t_data_sg, se_cmd->t_data_nents,
2097 struct se_cmd *se_cmd = &cmd->se_cmd;
2105 isert_cmd, se_cmd->data_length);
2107 if (isert_prot_cmd(isert_conn, se_cmd)) {
2142 isert_cmd, cmd->se_cmd.data_length, cmd->write_data_done);
2205 * context during pre se_cmd excecution failure.
2543 (cmd->write_data_done < cmd->se_cmd.data_length))