FreeBSD/sys/dev/isci/scil/sati_util.c
/**
 * @brief This method will construct the block descriptor in the user's descriptor
 *            sense data buffer location.
 *
 * @param[in]     sense_data This parameter specifies the user SCSI IO request
 *                for which to set the sense data byte.
 * @param[in]     sense_len This parameter specifies length of the sense data
 *                to be returned by SATI.
 * @param[out]    descriptor_len This parameter returns the length of constructed
 *                descriptor.
 *
 * @return none
 */
@brief This method will construct the block descriptor in the user's descriptor
sense data buffer location.

@param[in]     sense_data This parameter specifies the user SCSI IO request
for which to set the sense data byte.
@param[in]     sense_len This parameter specifies length of the sense data
to be returned by SATI.
@param[out]    descriptor_len This parameter returns the length of constructed
descriptor.

@return none
@brief This method will construct the block descriptor in the user ' s descriptor sense data buffer location . @param [ in ] sense_data This parameter specifies the user SCSI IO request for which to set the sense data byte . @param [ in ] sense_len This parameter specifies length of the sense data to be returned by SATI . @param [ out ] descriptor_len This parameter returns the length of constructed descriptor . @return none
static
void sati_scsi_block_descriptor_construct(
        U8 * sense_data,
        U32 sense_len)
{
    U8 ili = 1;
    sati_set_sense_data_byte(sense_data, sense_len, 0,  SCSI_BLOCK_DESCRIPTOR_TYPE);
    sati_set_sense_data_byte(sense_data, sense_len, 1,  SCSI_BLOCK_DESCRIPTOR_ADDITIONAL_LENGTH);
    sati_set_sense_data_byte(sense_data, sense_len, 2,  0);
    sati_set_sense_data_byte(sense_data, sense_len, 3,  (ili << 5));
}
static void sati_scsi_block_descriptor_construct ( U8 * sense_data , U32 sense_len ) { U8 ili = 1 ; sati_set_sense_data_byte ( sense_data , sense_len , 0 , SCSI_BLOCK_DESCRIPTOR_TYPE ) ; sati_set_sense_data_byte ( sense_data , sense_len , 1 , SCSI_BLOCK_DESCRIPTOR_ADDITIONAL_LENGTH ) ; sati_set_sense_data_byte ( sense_data , sense_len , 2 , 0 ) ; sati_set_sense_data_byte ( sense_data , sense_len , 3 , ( ili << 5 ) ) ; }
@brief This method will construct the block descriptor in the user's descriptor
            sense data buffer location.
@brief This method will construct the block descriptor in the user ' s descriptor sense data buffer location .