Lines Matching refs:se_cmd
72 isert_prot_cmd(struct isert_conn *conn, struct se_cmd *cmd) in isert_prot_cmd()
1296 data_len = cmd->se_cmd.data_length; in isert_handle_scsi_cmd()
1299 cmd->se_cmd.se_cmd_flags |= SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC; in isert_handle_scsi_cmd()
1313 sg_copy_from_buffer(cmd->se_cmd.t_data_sg, sg_nents, in isert_handle_scsi_cmd()
1319 cmd->se_cmd.t_data_sg = &isert_cmd->sg; in isert_handle_scsi_cmd()
1320 cmd->se_cmd.t_data_nents = 1; in isert_handle_scsi_cmd()
1328 if (cmd->write_data_done == cmd->se_cmd.data_length) { in isert_handle_scsi_cmd()
1341 target_put_sess_cmd(&cmd->se_cmd); in isert_handle_scsi_cmd()
1374 cmd->se_cmd.data_length); in isert_handle_iscsi_dataout()
1377 sg_start = &cmd->se_cmd.t_data_sg[sg_off]; in isert_handle_iscsi_dataout()
1752 cmd->se_cmd.t_state == TRANSPORT_WRITE_PENDING) { in isert_put_cmd()
1753 struct se_cmd *se_cmd = &cmd->se_cmd; in isert_put_cmd() local
1755 target_put_sess_cmd(se_cmd); in isert_put_cmd()
1760 transport_generic_free_cmd(&cmd->se_cmd, 0); in isert_put_cmd()
1768 transport_generic_free_cmd(&cmd->se_cmd, 0); in isert_put_cmd()
1788 if (cmd->se_cmd.se_tfo != NULL) { in isert_put_cmd()
1791 transport_generic_free_cmd(&cmd->se_cmd, 0); in isert_put_cmd()
1830 isert_check_pi_status(struct se_cmd *se_cmd, struct ib_mr *sig_mr) in isert_check_pi_status() argument
1843 u32 block_size = se_cmd->se_dev->dev_attrib.block_size + 8; in isert_check_pi_status()
1847 se_cmd->pi_err = TCM_LOGICAL_BLOCK_GUARD_CHECK_FAILED; in isert_check_pi_status()
1850 se_cmd->pi_err = TCM_LOGICAL_BLOCK_REF_TAG_CHECK_FAILED; in isert_check_pi_status()
1853 se_cmd->pi_err = TCM_LOGICAL_BLOCK_APP_TAG_CHECK_FAILED; in isert_check_pi_status()
1858 se_cmd->bad_sector = sec_offset_err + se_cmd->t_task_lba; in isert_check_pi_status()
1863 (unsigned long long)se_cmd->bad_sector, in isert_check_pi_status()
1879 struct se_cmd *se_cmd = &cmd->se_cmd; in isert_completion_rdma_write() local
1885 ret = isert_check_pi_status(se_cmd, in isert_completion_rdma_write()
1893 transport_send_check_condition_and_sense(se_cmd, in isert_completion_rdma_write()
1894 se_cmd->pi_err, 0); in isert_completion_rdma_write()
1905 struct se_cmd *se_cmd = &cmd->se_cmd; in isert_completion_rdma_read() local
1911 ret = isert_check_pi_status(se_cmd, in isert_completion_rdma_read()
1928 target_put_sess_cmd(se_cmd); in isert_completion_rdma_read()
1929 transport_send_check_condition_and_sense(se_cmd, in isert_completion_rdma_read()
1930 se_cmd->pi_err, 0); in isert_completion_rdma_read()
1932 target_execute_cmd(se_cmd); in isert_completion_rdma_read()
2164 if (cmd->se_cmd.sense_buffer && in isert_put_response()
2165 ((cmd->se_cmd.se_cmd_flags & SCF_TRANSPORT_TASK_SENSE) || in isert_put_response()
2166 (cmd->se_cmd.se_cmd_flags & SCF_EMULATED_TASK_SENSE))) { in isert_put_response()
2172 put_unaligned_be16(cmd->se_cmd.scsi_sense_length, in isert_put_response()
2174 cmd->se_cmd.scsi_sense_length += sizeof(__be16); in isert_put_response()
2176 padding = -(cmd->se_cmd.scsi_sense_length) & 3; in isert_put_response()
2177 hton24(hdr->dlength, (u32)cmd->se_cmd.scsi_sense_length); in isert_put_response()
2178 pdu_len = cmd->se_cmd.scsi_sense_length + padding; in isert_put_response()
2379 sg_start = &cmd->se_cmd.t_data_sg[sg_off]; in isert_build_rdma_wr()
2380 sg_nents = min(cmd->se_cmd.t_data_nents - sg_off, isert_conn->max_sge); in isert_build_rdma_wr()
2420 struct se_cmd *se_cmd = &cmd->se_cmd; in isert_map_rdma() local
2432 ret = isert_map_data_buf(isert_conn, isert_cmd, se_cmd->t_data_sg, in isert_map_rdma()
2433 se_cmd->t_data_nents, se_cmd->data_length, in isert_map_rdma()
2592 isert_set_dif_domain(struct se_cmd *se_cmd, struct ib_sig_attrs *sig_attrs, in isert_set_dif_domain() argument
2597 domain->sig.dif.pi_interval = se_cmd->se_dev->dev_attrib.block_size; in isert_set_dif_domain()
2598 domain->sig.dif.ref_tag = se_cmd->reftag_seed; in isert_set_dif_domain()
2607 if (se_cmd->prot_type == TARGET_DIF_TYPE1_PROT || in isert_set_dif_domain()
2608 se_cmd->prot_type == TARGET_DIF_TYPE2_PROT) in isert_set_dif_domain()
2613 isert_set_sig_attrs(struct se_cmd *se_cmd, struct ib_sig_attrs *sig_attrs) in isert_set_sig_attrs() argument
2615 switch (se_cmd->prot_op) { in isert_set_sig_attrs()
2619 isert_set_dif_domain(se_cmd, sig_attrs, &sig_attrs->wire); in isert_set_sig_attrs()
2624 isert_set_dif_domain(se_cmd, sig_attrs, &sig_attrs->mem); in isert_set_sig_attrs()
2628 isert_set_dif_domain(se_cmd, sig_attrs, &sig_attrs->wire); in isert_set_sig_attrs()
2629 isert_set_dif_domain(se_cmd, sig_attrs, &sig_attrs->mem); in isert_set_sig_attrs()
2632 isert_err("Unsupported PI operation %d\n", se_cmd->prot_op); in isert_set_sig_attrs()
2649 struct se_cmd *se_cmd, in isert_reg_sig_mr() argument
2660 ret = isert_set_sig_attrs(se_cmd, &sig_attrs); in isert_reg_sig_mr()
2664 sig_attrs.check_mask = isert_set_prot_checks(se_cmd->prot_checks); in isert_reg_sig_mr()
2679 if (se_cmd->t_prot_sg) in isert_reg_sig_mr()
2696 rdma_wr->ib_sg[SIG].length = se_cmd->data_length; in isert_reg_sig_mr()
2697 if (se_cmd->prot_op != TARGET_PROT_DIN_STRIP && in isert_reg_sig_mr()
2698 se_cmd->prot_op != TARGET_PROT_DOUT_INSERT) in isert_reg_sig_mr()
2703 rdma_wr->ib_sg[SIG].length += se_cmd->prot_length; in isert_reg_sig_mr()
2718 struct se_cmd *se_cmd = &isert_cmd->iscsi_cmd->se_cmd; in isert_handle_prot_cmd() local
2732 if (se_cmd->t_prot_sg) { in isert_handle_prot_cmd()
2734 se_cmd->t_prot_sg, in isert_handle_prot_cmd()
2735 se_cmd->t_prot_nents, in isert_handle_prot_cmd()
2736 se_cmd->prot_length, in isert_handle_prot_cmd()
2754 ret = isert_reg_sig_mr(isert_conn, se_cmd, wr, wr->fr_desc); in isert_handle_prot_cmd()
2765 if (se_cmd->t_prot_sg) in isert_handle_prot_cmd()
2775 struct se_cmd *se_cmd = &cmd->se_cmd; in isert_reg_rdma() local
2788 ret = isert_map_data_buf(isert_conn, isert_cmd, se_cmd->t_data_sg, in isert_reg_rdma()
2789 se_cmd->t_data_nents, se_cmd->data_length, in isert_reg_rdma()
2794 if (wr->data.dma_nents != 1 || isert_prot_cmd(isert_conn, se_cmd)) { in isert_reg_rdma()
2808 if (isert_prot_cmd(isert_conn, se_cmd)) { in isert_reg_rdma()
2833 rdma_wr->wr.send_flags = !isert_prot_cmd(isert_conn, se_cmd) ? in isert_reg_rdma()
2858 struct se_cmd *se_cmd = &cmd->se_cmd; in isert_put_datain() local
2867 isert_cmd, se_cmd->data_length); in isert_put_datain()
2876 if (!isert_prot_cmd(isert_conn, se_cmd)) { in isert_put_datain()
2901 if (!isert_prot_cmd(isert_conn, se_cmd)) in isert_put_datain()
2914 struct se_cmd *se_cmd = &cmd->se_cmd; in isert_get_dataout() local
2923 isert_cmd, se_cmd->data_length, cmd->write_data_done); in isert_get_dataout()
3328 (cmd->write_data_done < cmd->se_cmd.data_length)) in isert_put_unsol_pending_cmds()