FreeBSD/sys/dev/isci/scil/sati_mode_sense.c
/**
 * @brief This method performs the disconnect/reconnect mode page
 *        specific data translation based upon the contents of the remote
 *        device IDENTIFY DEVICE data.
 *        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 received as part of the IO request.
 * @param[in] offset This parameter specifies the offset into the data
 *            buffer where the translated data is to be written.
 *
 * @return This method returns the size of the mode page data that was
 *         translated.
 */
@brief This method performs the disconnect/reconnect mode page
specific data translation based upon the contents of the remote
device IDENTIFY DEVICE data.
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 received as part of the IO request.
@param[in] offset This parameter specifies the offset into the data
buffer where the translated data is to be written.

@return This method returns the size of the mode page data that was
translated.
@brief This method performs the disconnect / reconnect mode page specific data translation based upon the contents of the remote device IDENTIFY DEVICE data . 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 received as part of the IO request . @param [ in ] offset This parameter specifies the offset into the data buffer where the translated data is to be written . @return This method returns the size of the mode page data that was translated .
U32 sati_mode_sense_disconnect_reconnect_translate_data(
   SATI_TRANSLATOR_SEQUENCE_T * sequence,
   void                       * scsi_io,
   ATA_IDENTIFY_DEVICE_DATA_T * identify,
   U32                          offset
)
{
   U8 * cdb          = sati_cb_get_cdb_address(scsi_io);
   U8   page_control = sati_get_cdb_byte(cdb, 2) >> SCSI_MODE_SENSE_PC_SHIFT;
   U32  page_length;
   page_length = sati_mode_sense_copy_initial_data(
                    sequence,
                    scsi_io,
                    offset,
                    page_control,
                    SCSI_MODE_PAGE_DISCONNECT_RECONNECT
                 );
   return page_length;
}
U32 sati_mode_sense_disconnect_reconnect_translate_data ( SATI_TRANSLATOR_SEQUENCE_T * sequence , void * scsi_io , ATA_IDENTIFY_DEVICE_DATA_T * identify , U32 offset ) { U8 * cdb = sati_cb_get_cdb_address ( scsi_io ) ; U8 page_control = sati_get_cdb_byte ( cdb , 2 ) >> SCSI_MODE_SENSE_PC_SHIFT ; U32 page_length ; page_length = sati_mode_sense_copy_initial_data ( sequence , scsi_io , offset , page_control , SCSI_MODE_PAGE_DISCONNECT_RECONNECT ) ; return page_length ; }
@brief This method performs the disconnect/reconnect mode page
        specific data translation based upon the contents of the remote
        device IDENTIFY DEVICE data.
@brief This method performs the disconnect / reconnect mode page specific data translation based upon the contents of the remote device IDENTIFY DEVICE data .
// Currently we do not override any bits in this mode page from the // identify data.