FreeBSD/sys/dev/isci/scil/sati_util.c
/**
 * @brief This method will construct a ATA SMART Return Status command so the
 *        status of the ATA device can be returned. The status of the SMART
 *        threshold will be returned by this command.
 *
 * @return N/A
 *
 */
@brief This method will construct a ATA SMART Return Status command so the
status of the ATA device can be returned. The status of the SMART
threshold will be returned by this command.

@return N/A
@brief This method will construct a ATA SMART Return Status command so the status of the ATA device can be returned . The status of the SMART threshold will be returned by this command . @return N / A
void sati_ata_smart_read_log_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_SMART);
   sati_set_ata_features(register_fis, ATA_SMART_SUB_CMD_READ_LOG);
   sati_set_ata_lba_high(register_fis, 0xC2);
   sati_set_ata_lba_mid(register_fis, 0x4F);
   sati_set_ata_lba_low(register_fis, log_address);
   sequence->data_direction      = SATI_DATA_DIRECTION_IN;
   sequence->protocol            = SAT_PROTOCOL_PIO_DATA_IN;
   sequence->ata_transfer_length = transfer_length;
}
void sati_ata_smart_read_log_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_SMART ) ; sati_set_ata_features ( register_fis , ATA_SMART_SUB_CMD_READ_LOG ) ; sati_set_ata_lba_high ( register_fis , 0xC2 ) ; sati_set_ata_lba_mid ( register_fis , 0x4F ) ; sati_set_ata_lba_low ( register_fis , log_address ) ; 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 ATA SMART Return Status command so the
        status of the ATA device can be returned.
@brief This method will construct a ATA SMART Return Status command so the status of the ATA device can be returned .