Lines Matching refs:se_cmd

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