FreeBSD/sys/dev/isci/scil/sati_util.c
/*
 * @brief This method builds the scsi response data for a sata task management
 *        request.
 *
 * @param[in]     sequence This parameter specifies the translation sequence
 *                for which to construct the sense data.
 * @param[in,out] scsi_io This parameter specifies the user's IO request
 *                for which to construct the sense data.
 * @param[in]     response_data The response status for the task management
 *                request.
 */
@brief This method builds the scsi response data for a sata task management
request.

@param[in]     sequence This parameter specifies the translation sequence
for which to construct the sense data.
@param[in,out] scsi_io This parameter specifies the user's IO request
for which to construct the sense data.
@param[in]     response_data The response status for the task management
request.
@brief This method builds the scsi response data for a sata task management request . @param [ in ] sequence This parameter specifies the translation sequence for which to construct the sense data . @param [ in out ] scsi_io This parameter specifies the user ' s IO request for which to construct the sense data . @param [ in ] response_data The response status for the task management request .
void sati_scsi_response_data_construct(
   SATI_TRANSLATOR_SEQUENCE_T * sequence,
   void                       * scsi_io,
   U8                           response_data
)
{
#ifdef SATI_TRANSPORT_SUPPORTS_SAS
   SCI_SSP_RESPONSE_IU_T * rsp_iu  = (SCI_SSP_RESPONSE_IU_T*)
                                        sati_cb_get_response_iu_address(scsi_io);
   rsp_iu->data_present            = 0x01;
   rsp_iu->response_data_length[3] = sizeof(U32);
   rsp_iu->status                  = 0;
   ((U8 *)rsp_iu->data)[3]         = response_data;
#else
#endif 
}
void sati_scsi_response_data_construct ( SATI_TRANSLATOR_SEQUENCE_T * sequence , void * scsi_io , U8 response_data ) { #ifdef SATI_TRANSPORT_SUPPORTS_SAS SCI_SSP_RESPONSE_IU_T * rsp_iu = ( SCI_SSP_RESPONSE_IU_T * ) sati_cb_get_response_iu_address ( scsi_io ) ; rsp_iu -> data_present = 0x01 ; rsp_iu -> response_data_length [ 3 ] = sizeof ( U32 ) ; rsp_iu -> status = 0 ; ( ( U8 * ) rsp_iu -> data ) [ 3 ] = response_data ; #else #endif }
@brief This method builds the scsi response data for a sata task management
        request.
@brief This method builds the scsi response data for a sata task management request .
// SATI_TRANSPORT_SUPPORTS_SAS