FreeBSD/sys/dev/isci/scil/sati_util.c
/**
 * @brief This method will construct a Read Log ext ATA command that
 *        will request a log page based on the log_address.
 *
 * @param[in]  log_address This parameter specifies the log page
 *             to be returned from Read Log Ext.
 *
 * @param[in]  transfer_length This parameter specifies the size of the
 *             log page response returned by Read Log Ext.
 *
 * @return N/A
 *
 */
@brief This method will construct a Read Log ext ATA command that
will request a log page based on the log_address.

@param[in]  log_address This parameter specifies the log page
to be returned from Read Log Ext.

@param[in]  transfer_length This parameter specifies the size of the
log page response returned by Read Log Ext.

@return N/A
@brief This method will construct a Read Log ext ATA command that will request a log page based on the log_address . @param [ in ] log_address This parameter specifies the log page to be returned from Read Log Ext . @param [ in ] transfer_length This parameter specifies the size of the log page response returned by Read Log Ext . @return N / A
void sati_ata_read_log_ext_construct(
   void                          * ata_io,
   SATI_TRANSLATOR_SEQUENCE_T    * sequence,
   U8                              log_address,
   U32                             transfer_length
)
{
   U8 * register_fis = sati_cb_get_h2d_register_fis_address(ata_io);
   sati_set_ata_command(register_fis, ATA_READ_LOG_EXT);
   sati_set_ata_lba_low(register_fis, log_address);
   sati_set_ata_lba_mid(register_fis, 0x00);
   sati_set_ata_lba_mid_exp(register_fis, 0x00);
   sati_set_ata_sector_count(register_fis, 0x01);
   sequence->data_direction      = SATI_DATA_DIRECTION_IN;
   sequence->protocol            = SAT_PROTOCOL_PIO_DATA_IN;
   sequence->ata_transfer_length = transfer_length;
}
void sati_ata_read_log_ext_construct ( void * ata_io , SATI_TRANSLATOR_SEQUENCE_T * sequence , U8 log_address , U32 transfer_length ) { U8 * register_fis = sati_cb_get_h2d_register_fis_address ( ata_io ) ; sati_set_ata_command ( register_fis , ATA_READ_LOG_EXT ) ; sati_set_ata_lba_low ( register_fis , log_address ) ; sati_set_ata_lba_mid ( register_fis , 0x00 ) ; sati_set_ata_lba_mid_exp ( register_fis , 0x00 ) ; sati_set_ata_sector_count ( register_fis , 0x01 ) ; sequence -> data_direction = SATI_DATA_DIRECTION_IN ; sequence -> protocol = SAT_PROTOCOL_PIO_DATA_IN ; sequence -> ata_transfer_length = transfer_length ; }
@brief This method will construct a Read Log ext ATA command that
        will request a log page based on the log_address.
@brief This method will construct a Read Log ext ATA command that will request a log page based on the log_address .