Lines Matching +full:0 +full:xe4

42  * @return: 1 on match, 0 on no-match
52 return 0; in target_xcopy_locate_se_dev_e4_iter()
55 memset(&tmp_dev_wwn[0], 0, XCOPY_NAA_IEEE_REGEX_LEN); in target_xcopy_locate_se_dev_e4_iter()
56 spc_gen_naa_6h_vendor_specific(se_dev, &tmp_dev_wwn[0]); in target_xcopy_locate_se_dev_e4_iter()
58 rc = memcmp(&tmp_dev_wwn[0], dev_wwn, XCOPY_NAA_IEEE_REGEX_LEN); in target_xcopy_locate_se_dev_e4_iter()
59 if (rc != 0) { in target_xcopy_locate_se_dev_e4_iter()
62 return 0; in target_xcopy_locate_se_dev_e4_iter()
64 pr_debug("XCOPY 0xe4: located se_dev: %p\n", se_dev); in target_xcopy_locate_se_dev_e4_iter()
83 pr_debug("XCOPY 0xe4: searching for: %*ph\n", in target_xcopy_locate_se_dev_e4()
110 return 0; in target_xcopy_locate_se_dev_e4()
112 pr_debug_ratelimited("Unable to locate 0xe4 descriptor for EXTENDED_COPY\n"); in target_xcopy_locate_se_dev_e4()
126 pr_debug("XCOPY 0xe4: RELATIVE INITIATOR PORT IDENTIFIER: %hu\n", ript); in target_xcopy_parse_tiddesc_e4()
130 if ((desc[4] & 0x0f) != 0x1) { in target_xcopy_parse_tiddesc_e4()
131 pr_err("XCOPY 0xe4: code set of non binary type not supported\n"); in target_xcopy_parse_tiddesc_e4()
134 if ((desc[5] & 0x30) != 0x00) { in target_xcopy_parse_tiddesc_e4()
135 pr_err("XCOPY 0xe4: association other than LUN not supported\n"); in target_xcopy_parse_tiddesc_e4()
138 if ((desc[5] & 0x0f) != 0x3) { in target_xcopy_parse_tiddesc_e4()
139 pr_err("XCOPY 0xe4: designator type unsupported: 0x%02x\n", in target_xcopy_parse_tiddesc_e4()
140 (desc[5] & 0x0f)); in target_xcopy_parse_tiddesc_e4()
149 pr_err("XCOPY 0xe4: invalid desig_len: %d\n", (int)desig_len); in target_xcopy_parse_tiddesc_e4()
152 pr_debug("XCOPY 0xe4: desig_len: %d\n", (int)desig_len); in target_xcopy_parse_tiddesc_e4()
156 if ((desc[8] & 0xf0) != 0x60) { in target_xcopy_parse_tiddesc_e4()
157 pr_err("XCOPY 0xe4: Unsupported DESIGNATOR TYPE: 0x%02x\n", in target_xcopy_parse_tiddesc_e4()
158 (desc[8] & 0xf0)); in target_xcopy_parse_tiddesc_e4()
163 pr_debug("XCOPY 0xe4: ignoring CSCD entry %d - neither src nor " in target_xcopy_parse_tiddesc_e4()
165 return 0; in target_xcopy_parse_tiddesc_e4()
169 memcpy(&xop->src_tid_wwn[0], &desc[8], XCOPY_NAA_IEEE_REGEX_LEN); in target_xcopy_parse_tiddesc_e4()
173 if (!memcmp(&xop->local_dev_wwn[0], &xop->src_tid_wwn[0], in target_xcopy_parse_tiddesc_e4()
177 pr_debug("XCOPY 0xe4: Set xop->src_dev %p from source" in target_xcopy_parse_tiddesc_e4()
183 memcpy(&xop->dst_tid_wwn[0], &desc[8], XCOPY_NAA_IEEE_REGEX_LEN); in target_xcopy_parse_tiddesc_e4()
190 if (!memcmp(&xop->local_dev_wwn[0], &xop->dst_tid_wwn[0], in target_xcopy_parse_tiddesc_e4()
194 pr_debug("XCOPY 0xe4: Set xop->dst_dev: %p from destination" in target_xcopy_parse_tiddesc_e4()
199 return 0; in target_xcopy_parse_tiddesc_e4()
209 unsigned short cscd_index = 0; in target_xcopy_parse_target_descriptors()
210 unsigned short start = 0; in target_xcopy_parse_target_descriptors()
214 if (offset != 0) { in target_xcopy_parse_target_descriptors()
231 memset(&xop->local_dev_wwn[0], 0, XCOPY_NAA_IEEE_REGEX_LEN); in target_xcopy_parse_target_descriptors()
232 spc_gen_naa_6h_vendor_specific(local_dev, &xop->local_dev_wwn[0]); in target_xcopy_parse_target_descriptors()
236 * Check target descriptor identification with 0xE4 type, and in target_xcopy_parse_target_descriptors()
238 * the segment descriptor. Use VPD 0x83 WWPN matching .. in target_xcopy_parse_target_descriptors()
240 switch (desc[0]) { in target_xcopy_parse_target_descriptors()
241 case 0xe4: in target_xcopy_parse_target_descriptors()
243 &desc[0], cscd_index); in target_xcopy_parse_target_descriptors()
244 if (rc != 0) in target_xcopy_parse_target_descriptors()
252 " 0x%02x\n", desc[0]); in target_xcopy_parse_target_descriptors()
278 * If a matching IEEE NAA 0x83 descriptor for the requested device in target_xcopy_parse_target_descriptors()
280 * 0x0d/0x02 - COPY_TARGET_DEVICE_NOT_REACHABLE to request the in target_xcopy_parse_target_descriptors()
283 if (rc < 0) { in target_xcopy_parse_target_descriptors()
288 pr_debug("XCOPY TGT desc: Source dev: %p NAA IEEE WWN: 0x%16phN\n", in target_xcopy_parse_target_descriptors()
289 xop->src_dev, &xop->src_tid_wwn[0]); in target_xcopy_parse_target_descriptors()
290 pr_debug("XCOPY TGT desc: Dest dev: %p NAA IEEE WWN: 0x%16phN\n", in target_xcopy_parse_target_descriptors()
291 xop->dst_dev, &xop->dst_tid_wwn[0]); in target_xcopy_parse_target_descriptors()
302 int dc = (desc[1] & 0x02); in target_xcopy_parse_segdesc_02()
306 if (desc_len != 0x18) { in target_xcopy_parse_segdesc_02()
307 pr_err("XCOPY segment desc 0x02: Illegal desc_len:" in target_xcopy_parse_segdesc_02()
317 pr_err("XCOPY segment desc 0x02: unsupported CSCD ID > 0x%x; stdi: %hu dtdi: %hu\n", in target_xcopy_parse_segdesc_02()
322 pr_debug("XCOPY seg desc 0x02: desc_len: %hu stdi: %hu dtdi: %hu, DC: %d\n", in target_xcopy_parse_segdesc_02()
328 pr_debug("XCOPY seg desc 0x02: nolb: %hu src_lba: %llu dst_lba: %llu\n", in target_xcopy_parse_segdesc_02()
332 return 0; in target_xcopy_parse_segdesc_02()
340 unsigned int start = 0; in target_xcopy_parse_segment_descriptors()
341 int offset = sdll % XCOPY_SEGMENT_DESC_LEN, rc, ret = 0; in target_xcopy_parse_segment_descriptors()
345 if (offset != 0) { in target_xcopy_parse_segment_descriptors()
363 switch (desc[0]) { in target_xcopy_parse_segment_descriptors()
364 case 0x02: in target_xcopy_parse_segment_descriptors()
366 if (rc < 0) in target_xcopy_parse_segment_descriptors()
375 "type: 0x%02x\n", desc[0]); in target_xcopy_parse_segment_descriptors()
403 return 0; in xcopy_pt_get_cmd_state()
431 return 0; in xcopy_pt_check_stop_free()
436 return 0; in xcopy_pt_write_pending()
441 return 0; in xcopy_pt_queue_data_in()
446 return 0; in xcopy_pt_queue_status()
465 xcopy_wq = alloc_workqueue("xcopy_wq", WQ_MEM_RECLAIM, 0); in target_xcopy_setup_pt()
471 memset(&xcopy_pt_tpg, 0, sizeof(struct se_portal_group)); in target_xcopy_setup_pt()
477 memset(&xcopy_pt_nacl, 0, sizeof(struct se_node_acl)); in target_xcopy_setup_pt()
480 memset(&xcopy_pt_sess, 0, sizeof(struct se_session)); in target_xcopy_setup_pt()
489 return 0; in target_xcopy_setup_pt()
536 cmd->tag = 0; in target_xcopy_setup_pt_cmd()
541 xop->xop_data_nents, NULL, 0)) in target_xcopy_setup_pt_cmd()
547 return 0; in target_xcopy_setup_pt_cmd()
564 pr_debug("target_xcopy_issue_pt_cmd(): SCSI status: 0x%02x\n", in target_xcopy_issue_pt_cmd()
567 return (se_cmd->scsi_status) ? -EINVAL : 0; in target_xcopy_issue_pt_cmd()
584 memset(&xpt_cmd, 0, sizeof(xpt_cmd)); in target_xcopy_read_source()
587 memset(&cdb[0], 0, 16); in target_xcopy_read_source()
588 cdb[0] = READ_16; in target_xcopy_read_source()
595 DMA_FROM_DEVICE, 0, &xpt_cmd.sense_buffer[0], 0, in target_xcopy_read_source()
597 rc = target_xcopy_setup_pt_cmd(&xpt_cmd, xop, src_dev, &cdb[0], in target_xcopy_read_source()
599 if (rc < 0) { in target_xcopy_read_source()
608 if (rc < 0) in target_xcopy_read_source()
611 transport_generic_free_cmd(se_cmd, 0); in target_xcopy_read_source()
629 memset(&xpt_cmd, 0, sizeof(xpt_cmd)); in target_xcopy_write_destination()
632 memset(&cdb[0], 0, 16); in target_xcopy_write_destination()
633 cdb[0] = WRITE_16; in target_xcopy_write_destination()
640 DMA_TO_DEVICE, 0, &xpt_cmd.sense_buffer[0], 0, in target_xcopy_write_destination()
642 rc = target_xcopy_setup_pt_cmd(&xpt_cmd, xop, dst_dev, &cdb[0], in target_xcopy_write_destination()
644 if (rc < 0) { in target_xcopy_write_destination()
650 if (rc < 0) in target_xcopy_write_destination()
653 transport_generic_free_cmd(se_cmd, 0); in target_xcopy_write_destination()
664 int rc = 0; in target_xcopy_do_work()
666 unsigned int copied_bytes = 0; in target_xcopy_do_work()
721 if (rc < 0) in target_xcopy_do_work()
730 if (rc < 0) in target_xcopy_do_work()
742 if (rc < 0) in target_xcopy_do_work()
802 list_id = p[0]; in target_parse_xcopy_cmd()
803 list_id_usage = (p[1] & 0x18) >> 3; in target_parse_xcopy_cmd()
818 if (inline_dl != 0) { in target_parse_xcopy_cmd()
831 pr_debug("Processing XCOPY with list_id: 0x%02x list_id_usage: 0x%02x" in target_parse_xcopy_cmd()
842 if (rc <= 0) in target_parse_xcopy_cmd()
849 if (rc <= 0) in target_parse_xcopy_cmd()
885 sa = se_cmd->t_task_cdb[1] & 0x1f; in target_do_xcopy()
886 if (sa != 0x00) { in target_do_xcopy()
891 if (se_cmd->data_length == 0) { in target_do_xcopy()
937 p[4] = 0x1; in target_rcr_operating_parameters()
955 * MAXIMUM INLINE DATA LENGTH for SA 0x04 (NOT SUPPORTED) in target_rcr_operating_parameters()
957 put_unaligned_be32(0x0, &p[20]); in target_rcr_operating_parameters()
961 put_unaligned_be32(0x0, &p[24]); in target_rcr_operating_parameters()
965 put_unaligned_be32(0x0, &p[28]); in target_rcr_operating_parameters()
989 p[43] = 0x2; in target_rcr_operating_parameters()
993 p[44] = 0x02; /* Copy Block to Block device */ in target_rcr_operating_parameters()
994 p[45] = 0xe4; /* Identification descriptor target descriptor */ in target_rcr_operating_parameters()
999 put_unaligned_be32(42, &p[0]); in target_rcr_operating_parameters()
1009 unsigned char *cdb = &se_cmd->t_task_cdb[0]; in target_do_receive_copy_results()
1010 int sa = (cdb[1] & 0x1f), list_id = cdb[2]; in target_do_receive_copy_results()
1019 pr_debug("Entering target_do_receive_copy_results: SA: 0x%02x, List ID:" in target_do_receive_copy_results()
1020 " 0x%02x, AL: %u\n", sa, list_id, se_cmd->data_length); in target_do_receive_copy_results()
1022 if (list_id != 0) { in target_do_receive_copy_results()
1036 pr_err("Unsupported SA for receive copy results: 0x%02x\n", sa); in target_do_receive_copy_results()