Lines Matching refs:se_cmd

51 isert_prot_cmd(struct isert_conn *conn, struct se_cmd *cmd)  in isert_prot_cmd()
1036 data_len = cmd->se_cmd.data_length; in isert_handle_scsi_cmd()
1039 cmd->se_cmd.se_cmd_flags |= SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC; in isert_handle_scsi_cmd()
1053 sg_copy_from_buffer(cmd->se_cmd.t_data_sg, sg_nents, in isert_handle_scsi_cmd()
1059 cmd->se_cmd.t_data_sg = &isert_cmd->sg; in isert_handle_scsi_cmd()
1060 cmd->se_cmd.t_data_nents = 1; in isert_handle_scsi_cmd()
1069 if (cmd->write_data_done == cmd->se_cmd.data_length) { in isert_handle_scsi_cmd()
1082 target_put_sess_cmd(&cmd->se_cmd); in isert_handle_scsi_cmd()
1115 cmd->se_cmd.data_length); in isert_handle_iscsi_dataout()
1118 sg_start = &cmd->se_cmd.t_data_sg[sg_off]; in isert_handle_iscsi_dataout()
1382 struct se_cmd *se_cmd = &cmd->iscsi_cmd->se_cmd; in isert_rdma_rw_ctx_destroy() local
1383 enum dma_data_direction dir = target_reverse_dma_direction(se_cmd); in isert_rdma_rw_ctx_destroy()
1388 if (isert_prot_cmd(conn, se_cmd)) { in isert_rdma_rw_ctx_destroy()
1390 conn->cm_id->port_num, se_cmd->t_data_sg, in isert_rdma_rw_ctx_destroy()
1391 se_cmd->t_data_nents, se_cmd->t_prot_sg, in isert_rdma_rw_ctx_destroy()
1392 se_cmd->t_prot_nents, dir); in isert_rdma_rw_ctx_destroy()
1395 se_cmd->t_data_sg, se_cmd->t_data_nents, dir); in isert_rdma_rw_ctx_destroy()
1427 cmd->se_cmd.t_state == TRANSPORT_WRITE_PENDING) { in isert_put_cmd()
1428 struct se_cmd *se_cmd = &cmd->se_cmd; in isert_put_cmd() local
1430 target_put_sess_cmd(se_cmd); in isert_put_cmd()
1435 transport_generic_free_cmd(&cmd->se_cmd, 0); in isert_put_cmd()
1443 transport_generic_free_cmd(&cmd->se_cmd, 0); in isert_put_cmd()
1463 if (cmd->se_cmd.se_tfo != NULL) { in isert_put_cmd()
1466 transport_generic_free_cmd(&cmd->se_cmd, 0); in isert_put_cmd()
1503 isert_check_pi_status(struct se_cmd *se_cmd, struct ib_mr *sig_mr) in isert_check_pi_status() argument
1516 u32 block_size = se_cmd->se_dev->dev_attrib.block_size + 8; in isert_check_pi_status()
1520 se_cmd->pi_err = TCM_LOGICAL_BLOCK_GUARD_CHECK_FAILED; in isert_check_pi_status()
1523 se_cmd->pi_err = TCM_LOGICAL_BLOCK_REF_TAG_CHECK_FAILED; in isert_check_pi_status()
1526 se_cmd->pi_err = TCM_LOGICAL_BLOCK_APP_TAG_CHECK_FAILED; in isert_check_pi_status()
1531 se_cmd->bad_sector = sec_offset_err + se_cmd->t_task_lba; in isert_check_pi_status()
1536 (unsigned long long)se_cmd->bad_sector, in isert_check_pi_status()
1553 struct se_cmd *cmd = &isert_cmd->iscsi_cmd->se_cmd; in isert_rdma_write_done()
1596 struct se_cmd *se_cmd = &cmd->se_cmd; in isert_rdma_read_done() local
1611 if (isert_prot_cmd(isert_conn, se_cmd)) in isert_rdma_read_done()
1612 ret = isert_check_pi_status(se_cmd, isert_cmd->rw.reg->mr); in isert_rdma_read_done()
1628 transport_generic_request_failure(se_cmd, se_cmd->pi_err); in isert_rdma_read_done()
1630 target_execute_cmd(se_cmd); in isert_rdma_read_done()
1747 if (cmd->se_cmd.sense_buffer && in isert_put_response()
1748 ((cmd->se_cmd.se_cmd_flags & SCF_TRANSPORT_TASK_SENSE) || in isert_put_response()
1749 (cmd->se_cmd.se_cmd_flags & SCF_EMULATED_TASK_SENSE))) { in isert_put_response()
1755 put_unaligned_be16(cmd->se_cmd.scsi_sense_length, in isert_put_response()
1757 cmd->se_cmd.scsi_sense_length += sizeof(__be16); in isert_put_response()
1759 padding = -(cmd->se_cmd.scsi_sense_length) & 3; in isert_put_response()
1760 hton24(hdr->dlength, (u32)cmd->se_cmd.scsi_sense_length); in isert_put_response()
1761 pdu_len = cmd->se_cmd.scsi_sense_length + padding; in isert_put_response()
1954 isert_set_dif_domain(struct se_cmd *se_cmd, struct ib_sig_domain *domain) in isert_set_dif_domain() argument
1958 domain->sig.dif.pi_interval = se_cmd->se_dev->dev_attrib.block_size; in isert_set_dif_domain()
1959 domain->sig.dif.ref_tag = se_cmd->reftag_seed; in isert_set_dif_domain()
1968 if (se_cmd->prot_type == TARGET_DIF_TYPE1_PROT || in isert_set_dif_domain()
1969 se_cmd->prot_type == TARGET_DIF_TYPE2_PROT) in isert_set_dif_domain()
1974 isert_set_sig_attrs(struct se_cmd *se_cmd, struct ib_sig_attrs *sig_attrs) in isert_set_sig_attrs() argument
1978 switch (se_cmd->prot_op) { in isert_set_sig_attrs()
1982 isert_set_dif_domain(se_cmd, &sig_attrs->wire); in isert_set_sig_attrs()
1987 isert_set_dif_domain(se_cmd, &sig_attrs->mem); in isert_set_sig_attrs()
1991 isert_set_dif_domain(se_cmd, &sig_attrs->wire); in isert_set_sig_attrs()
1992 isert_set_dif_domain(se_cmd, &sig_attrs->mem); in isert_set_sig_attrs()
1995 isert_err("Unsupported PI operation %d\n", se_cmd->prot_op); in isert_set_sig_attrs()
1999 if (se_cmd->prot_checks & TARGET_DIF_CHECK_GUARD) in isert_set_sig_attrs()
2001 if (se_cmd->prot_checks & TARGET_DIF_CHECK_APPTAG) in isert_set_sig_attrs()
2003 if (se_cmd->prot_checks & TARGET_DIF_CHECK_REFTAG) in isert_set_sig_attrs()
2013 struct se_cmd *se_cmd = &cmd->iscsi_cmd->se_cmd; in isert_rdma_rw_ctx_post() local
2014 enum dma_data_direction dir = target_reverse_dma_direction(se_cmd); in isert_rdma_rw_ctx_post()
2033 if (isert_prot_cmd(conn, se_cmd)) { in isert_rdma_rw_ctx_post()
2036 ret = isert_set_sig_attrs(se_cmd, &sig_attrs); in isert_rdma_rw_ctx_post()
2042 se_cmd->t_data_sg, se_cmd->t_data_nents, in isert_rdma_rw_ctx_post()
2043 se_cmd->t_prot_sg, se_cmd->t_prot_nents, in isert_rdma_rw_ctx_post()
2047 se_cmd->t_data_sg, se_cmd->t_data_nents, in isert_rdma_rw_ctx_post()
2068 struct se_cmd *se_cmd = &cmd->se_cmd; in isert_put_datain() local
2076 isert_cmd, se_cmd->data_length); in isert_put_datain()
2078 if (isert_prot_cmd(isert_conn, se_cmd)) { in isert_put_datain()
2113 isert_cmd, cmd->se_cmd.data_length, cmd->write_data_done); in isert_get_dataout()
2498 (cmd->write_data_done < cmd->se_cmd.data_length)) in isert_put_unsol_pending_cmds()