Lines Matching full:dif
80 uint32_t addrlen_count, ocs_dif_t *dif, int is_crc);
81 …i_dif_check_app_tag(ocs_t *ocs, ocs_hw_dif_info_t *dif_info, uint16_t exp_app_tag, ocs_dif_t *dif);
82 …i_dif_check_ref_tag(ocs_t *ocs, ocs_hw_dif_info_t *dif_info, uint32_t exp_ref_tag, ocs_dif_t *dif);
388 …(dif_info->dif == SLI4_DIF_PASS_THROUGH) && (dif_info->dif_oper != OCS_HW_SGE_DIF_OP_IN_RAW_OUT_RA… in ocs_target_io_cb()
437 * @brief Determine if an IO is using CRC for DIF guard format.
440 * @param dif_info Pointer to HW DIF info data.
479 * @brief Check a block and DIF data, computing the appropriate SCSI status
482 * This function is used to check blocks and DIF when given an unknown DIF
486 * the block with the DIF error, find the bad block. If a block is found with an
512 ocs_dif_t *dif; /* pointer to DIF block returned from target */ in ocs_scsi_dif_check_unknown() local
524 …ocs_scsi_get_block_vaddr(io, (scsi_dif_info.lba + i), addrlen, ARRAY_SIZE(addrlen), (void**) &dif); in ocs_scsi_dif_check_unknown()
531 if (! ocs_scsi_dif_check_guard(dif_info, addrlen, addrlen_count, dif, is_crc)) { in ocs_scsi_dif_check_unknown()
536 if (! ocs_scsi_dif_check_app_tag(ocs, dif_info, scsi_dif_info.app_tag, dif)) { in ocs_scsi_dif_check_unknown()
541 if (! ocs_scsi_dif_check_ref_tag(ocs, dif_info, (scsi_dif_info.ref_tag + i), dif)) { in ocs_scsi_dif_check_unknown()
556 * @param dif_info Pointer to HW DIF info data.
559 * @param dif Pointer to the DIF data block being checked.
566 ocs_dif_t *dif, int is_crc) in ocs_scsi_dif_check_guard() argument
572 if ((dif == NULL) || !dif_info->check_guard) { in ocs_scsi_dif_check_guard()
580 return (crc == ocs_be16toh(dif->crc)); in ocs_scsi_dif_check_guard()
584 return (checksum == dif->crc); in ocs_scsi_dif_check_guard()
589 * @brief Check the app tag of dif data
595 * @param dif_info Pointer to HW DIF info data.
597 * @param dif Pointer to the DIF data block being checked.
602 …si_dif_check_app_tag(ocs_t *ocs, ocs_hw_dif_info_t *dif_info, uint16_t exp_app_tag, ocs_dif_t *dif) in ocs_scsi_dif_check_app_tag() argument
604 if ((dif == NULL) || !dif_info->check_app_tag) { in ocs_scsi_dif_check_app_tag()
609 exp_app_tag, ocs_be16toh(dif->app_tag)); in ocs_scsi_dif_check_app_tag()
611 return (exp_app_tag == ocs_be16toh(dif->app_tag)); in ocs_scsi_dif_check_app_tag()
615 * @brief Check the ref tag of dif data
621 * @param dif_info Pointer to HW DIF info data.
623 * @param dif Pointer to the DIF data block being checked.
628 …si_dif_check_ref_tag(ocs_t *ocs, ocs_hw_dif_info_t *dif_info, uint32_t exp_ref_tag, ocs_dif_t *dif) in ocs_scsi_dif_check_ref_tag() argument
630 if ((dif == NULL) || !dif_info->check_ref_tag) { in ocs_scsi_dif_check_ref_tag()
634 if (exp_ref_tag != ocs_be32toh(dif->ref_tag)) { in ocs_scsi_dif_check_ref_tag()
636 exp_ref_tag, ocs_be32toh(dif->ref_tag)); in ocs_scsi_dif_check_ref_tag()
649 * @param hw_dif Pointer to HW dif information.
661 /* Convert DIF Information */ in ocs_scsi_count_sgls()
663 /* If we're not DIF separate, then emit a seed SGE */ in ocs_scsi_count_sgls()
669 /* If DIF is enabled, and DIF is separate, then append a SEED then DIF SGE */ in ocs_scsi_count_sgls()
700 /* Convert DIF Information */ in ocs_scsi_build_sgls()
702 /* If we're not DIF separate, then emit a seed SGE */ in ocs_scsi_build_sgls()
710 /* if we are doing DIF separate, then figure out the block size so that we in ocs_scsi_build_sgls()
711 * can update the ref tag in the DIF seed SGE. Also verify that the in ocs_scsi_build_sgls()
739 /* If DIF is enabled, and DIF is separate, then append a SEED then DIF SGE */ in ocs_scsi_build_sgls()
749 /* Update the ref_tag for the next DIF seed SGE */ in ocs_scsi_build_sgls()
785 * @brief Convert SCSI API T10 DIF information into the FC HW format.
788 * @param scsi_dif_info Pointer to the SCSI API T10 DIF fields.
789 * @param hw_dif_info Pointer to the FC HW API T10 DIF fields.
806 /* Convert the DIF operation */ in ocs_scsi_convert_dif_info()
810 hw_dif_info->dif = SLI4_DIF_INSERT; in ocs_scsi_convert_dif_info()
814 hw_dif_info->dif = SLI4_DIF_STRIP; in ocs_scsi_convert_dif_info()
818 hw_dif_info->dif = SLI4_DIF_INSERT; in ocs_scsi_convert_dif_info()
822 hw_dif_info->dif = SLI4_DIF_STRIP; in ocs_scsi_convert_dif_info()
826 hw_dif_info->dif = SLI4_DIF_PASS_THROUGH; in ocs_scsi_convert_dif_info()
830 hw_dif_info->dif = SLI4_DIF_PASS_THROUGH; in ocs_scsi_convert_dif_info()
834 hw_dif_info->dif = SLI4_DIF_PASS_THROUGH; in ocs_scsi_convert_dif_info()
838 hw_dif_info->dif = SLI4_DIF_PASS_THROUGH; in ocs_scsi_convert_dif_info()
842 hw_dif_info->dif = SLI4_DIF_PASS_THROUGH; in ocs_scsi_convert_dif_info()
845 ocs_log_test(ocs, "unhandled SCSI DIF operation %d\n", in ocs_scsi_convert_dif_info()
870 ocs_log_test(ocs, "unhandled SCSI DIF block size %d\n", in ocs_scsi_convert_dif_info()
877 if (hw_dif_info->dif == SLI4_DIF_INSERT ) { in ocs_scsi_convert_dif_info()
1442 * @param dif_info Pointer to T10 DIF fields, or NULL if no DIF.
1507 /* If DIF is used, then save lba for error recovery */ in ocs_scsi_xfer_data()
1518 io->iparam.fcp_tgt.dif_oper = io->hw_dif.dif; in ocs_scsi_xfer_data()
2254 * @param dif_info Pointer to the T10 DIF fields, or NULL if no DIF.
2294 * @param dif_info Pointer to the T10 DIF fields, or NULL if no DIF.
2333 * @param dif_info Pointer to the T10 DIF fields, or NULL if no DIF.
2468 * @param dif_info Pointer to the T10 DIF fields, or NULL if no DIF.
2639 io->iparam.fcp_ini.dif_oper = io->hw_dif.dif; in ocs_scsi_send_io()