FreeBSD/sys/dev/isci/scil/sati_util.c
/**
 * @brief This method performs a copy operation using a source buffer,
 *        an offset into the destination buffer, and a length.
 *
 * @param[in]  sequence This parameter specifies the translation sequence
 *             for which to copy and swap the data.
 * @param[out] destination_scsi_io This parameter specifies the SCSI IO
 *             request containing the destination buffer into which to copy.
 * @param[in]  destination_offset This parameter specifies the offset into
 *             the data buffer where the information will be copied to.
 * @param[in]  source_buffer This parameter specifies the source buffer from
 *             which the data will be copied.
 * @param[in]  length This parameter specifies the number of bytes to copy
 *             during this operation.
 *
 * @return none
 */
@brief This method performs a copy operation using a source buffer,
an offset into the destination buffer, and a length.

@param[in]  sequence This parameter specifies the translation sequence
for which to copy and swap the data.
@param[out] destination_scsi_io This parameter specifies the SCSI IO
request containing the destination buffer into which to copy.
@param[in]  destination_offset This parameter specifies the offset into
the data buffer where the information will be copied to.
@param[in]  source_buffer This parameter specifies the source buffer from
which the data will be copied.
@param[in]  length This parameter specifies the number of bytes to copy
during this operation.

@return none
@brief This method performs a copy operation using a source buffer an offset into the destination buffer and a length . @param [ in ] sequence This parameter specifies the translation sequence for which to copy and swap the data . @param [ out ] destination_scsi_io This parameter specifies the SCSI IO request containing the destination buffer into which to copy . @param [ in ] destination_offset This parameter specifies the offset into the data buffer where the information will be copied to . @param [ in ] source_buffer This parameter specifies the source buffer from which the data will be copied . @param [ in ] length This parameter specifies the number of bytes to copy during this operation . @return none
void sati_copy_data(
   SATI_TRANSLATOR_SEQUENCE_T * sequence,
   void                       * destination_scsi_io,
   U32                          destination_offset,
   U8                         * source_buffer,
   U32                          length
)
{
   while (length > 0)
   {
      sati_set_data_byte(
         sequence, destination_scsi_io, destination_offset, *source_buffer
      );
      destination_offset++;
      source_buffer++;
      length--;
   }
}
void sati_copy_data ( SATI_TRANSLATOR_SEQUENCE_T * sequence , void * destination_scsi_io , U32 destination_offset , U8 * source_buffer , U32 length ) { while ( length > 0 ) { sati_set_data_byte ( sequence , destination_scsi_io , destination_offset , * source_buffer ) ; destination_offset ++ ; source_buffer ++ ; length -- ; } }
@brief This method performs a copy operation using a source buffer,
        an offset into the destination buffer, and a length.
@brief This method performs a copy operation using a source buffer an offset into the destination buffer and a length .