FreeBSD/sys/dev/isci/scil/scic_sds_stp_request.c
/**
 * This method will perform request construction common to all types of
 * STP requests that are optimized by the silicon (i.e. UDMA, NCQ).
 *
 * @param[in,out] this_request This parameter specifies the request to be
 *                constructed as an optimized request.
 * @param[in] optimized_task_type This parameter specifies whether the
 *            request is to be an UDMA request or a NCQ request.
 *            - A value of 0 indicates UDMA.
 *            - A value of 1 indicates NCQ.
 *
 * @return This method returns an indication as to whether the construction
 *         was successful.
 */
This method will perform request construction common to all types of
STP requests that are optimized by the silicon .

@param[in,out] this_request This parameter specifies the request to be
constructed as an optimized request.
@param[in] optimized_task_type This parameter specifies whether the
request is to be an UDMA request or a NCQ request.
- A value of 0 indicates UDMA.
- A value of 1 indicates NCQ.

@return This method returns an indication as to whether the construction
was successful.
This method will perform request construction common to all types of STP requests that are optimized by the silicon . @param [ in out ] this_request This parameter specifies the request to be constructed as an optimized request . @param [ in ] optimized_task_type This parameter specifies whether the request is to be an UDMA request or a NCQ request . - A value of 0 indicates UDMA . - A value of 1 indicates NCQ . @return This method returns an indication as to whether the construction was successful .
static
void scic_sds_stp_optimized_request_construct(
   SCIC_SDS_REQUEST_T * this_request,
   U8                   optimized_task_type,
   U32                  transfer_length,
   SCI_IO_REQUEST_DATA_DIRECTION data_direction
)
{
   SCU_TASK_CONTEXT_T * task_context = this_request->task_context_buffer;
   scu_sata_reqeust_construct_task_context(this_request, task_context);
   task_context->transfer_length_bytes = transfer_length;
   if ( data_direction == SCI_IO_REQUEST_DATA_OUT )
   {
      task_context->task_type = optimized_task_type + (SCU_TASK_TYPE_DMA_OUT
                                                     - SCU_TASK_TYPE_DMA_IN);
   }
   else
   {
      task_context->task_type = optimized_task_type;
   }
}
static void scic_sds_stp_optimized_request_construct ( SCIC_SDS_REQUEST_T * this_request , U8 optimized_task_type , U32 transfer_length , SCI_IO_REQUEST_DATA_DIRECTION data_direction ) { SCU_TASK_CONTEXT_T * task_context = this_request -> task_context_buffer ; scu_sata_reqeust_construct_task_context ( this_request , task_context ) ; task_context -> transfer_length_bytes = transfer_length ; if ( data_direction == SCI_IO_REQUEST_DATA_OUT ) { task_context -> task_type = optimized_task_type + ( SCU_TASK_TYPE_DMA_OUT - SCU_TASK_TYPE_DMA_IN ) ; } else { task_context -> task_type = optimized_task_type ; } }
This method will perform request construction common to all types of
 STP requests that are optimized by the silicon (i.e.
This method will perform request construction common to all types of STP requests that are optimized by the silicon ( i . e .
// Build the STP task context structure // Copy over the number of bytes to be transferred // The difference between the DMA IN and DMA OUT request task type // values are consistent with the difference between FPDMA READ // and FPDMA WRITE values.  Add the supplied task type parameter // to this difference to set the task type properly for this // DATA OUT (WRITE) case. // For the DATA IN (READ) case, simply save the supplied // optimized task type.