FreeBSD/sys/dev/isci/scil/sati_mode_sense_6.c
/**
 * @brief This method perform the data translation common to all SCSI MODE
 *        SENSE 6 byte commands.  This includes building the mode page
 *        header and block descriptor (if requested).
 *        For more information on the parameters passed to this method,
 *        please reference sati_translate_command().
 *
 * @param[in] identify This parameter specifies the remote device's IDENTIFY
 *            DEVICE data to be used during translation.
 * @param[in] transfer_length This parameter specifies the size of the
 *            mode page (including header & block descriptor).
 *
 * @return This method returns the number of bytes written into the user's
 *         mode page data buffer.
 */
@brief This method perform the data translation common to all SCSI MODE
SENSE 6 byte commands.  This includes building the mode page
header and block descriptor (if requested).
For more information on the parameters passed to this method,
please reference sati_translate_command().

@param[in] identify This parameter specifies the remote device's IDENTIFY
DEVICE data to be used during translation.
@param[in] transfer_length This parameter specifies the size of the
mode page (including header & block descriptor).

@return This method returns the number of bytes written into the user's
mode page data buffer.
@brief This method perform the data translation common to all SCSI MODE SENSE 6 byte commands . This includes building the mode page header and block descriptor ( if requested ) . For more information on the parameters passed to this method please reference sati_translate_command () . @param [ in ] identify This parameter specifies the remote device ' s IDENTIFY DEVICE data to be used during translation . @param [ in ] transfer_length This parameter specifies the size of the mode page ( including header & block descriptor ) . @return This method returns the number of bytes written into the user ' s mode page data buffer .
static
U32 sati_mode_sense_6_translate_data(
   SATI_TRANSLATOR_SEQUENCE_T * sequence,
   ATA_IDENTIFY_DEVICE_DATA_T * identify,
   void                       * scsi_io,
   U8                           transfer_length
)
{
   U8  * cdb = sati_cb_get_cdb_address(scsi_io);
   U32   offset;
   offset = sati_mode_sense_6_build_header(
               sequence, scsi_io, identify, transfer_length
            );
   if ((sati_get_cdb_byte(cdb, 1) & SCSI_MODE_SENSE_DBD_ENABLE) == 0)
      offset += sati_mode_sense_build_std_block_descriptor(
                   sequence, scsi_io, identify, offset
                );
   return offset;
}
static U32 sati_mode_sense_6_translate_data ( SATI_TRANSLATOR_SEQUENCE_T * sequence , ATA_IDENTIFY_DEVICE_DATA_T * identify , void * scsi_io , U8 transfer_length ) { U8 * cdb = sati_cb_get_cdb_address ( scsi_io ) ; U32 offset ; offset = sati_mode_sense_6_build_header ( sequence , scsi_io , identify , transfer_length ) ; if ( ( sati_get_cdb_byte ( cdb , 1 ) & SCSI_MODE_SENSE_DBD_ENABLE ) == 0 ) offset += sati_mode_sense_build_std_block_descriptor ( sequence , scsi_io , identify , offset ) ; return offset ; }
@brief This method perform the data translation common to all SCSI MODE
        SENSE 6 byte commands.
@brief This method perform the data translation common to all SCSI MODE SENSE 6 byte commands .
// Determine if the caller disabled block descriptors (DBD).  If not, // then generate a block descriptor.