FreeBSD/sys/dev/isci/scil/scic_sds_stp_request.c
/**
 * This method will construct the SATA PIO request.
 *
 * @param[in] scic_io_request The core request object which is cast to a SATA
 *            PIO request object.
 *
 * @return This method returns an indication as to whether the construction
 *         was successful.
 * @retval SCI_SUCCESS Currently this method always returns this value.
 */
This method will construct the SATA PIO request.
@param[in] scic_io_request The core request object which is cast to a SATA
PIO request object.

@return This method returns an indication as to whether the construction
was successful.
@retval SCI_SUCCESS Currently this method always returns this value.
This method will construct the SATA PIO request . @param [ in ] scic_io_request The core request object which is cast to a SATA PIO request object . @return This method returns an indication as to whether the construction was successful . @retval SCI_SUCCESS Currently this method always returns this value .
SCI_STATUS scic_sds_stp_pio_request_construct(
   SCIC_SDS_REQUEST_T  * scic_io_request,
   U8                    sat_protocol,
   BOOL                  copy_rx_frame
)
{
   SCIC_SDS_STP_REQUEST_T * this_request;
   this_request = (SCIC_SDS_STP_REQUEST_T *)scic_io_request;
   scic_sds_stp_non_ncq_request_construct(&this_request->parent);
   scu_stp_raw_request_construct_task_context(
      this_request, this_request->parent.task_context_buffer
   );
   this_request->type.pio.current_transfer_bytes = 0;
   this_request->type.pio.ending_error = 0;
   this_request->type.pio.ending_status = 0;
   this_request->type.pio.request_current.sgl_offset = 0;
   this_request->type.pio.request_current.sgl_set = SCU_SGL_ELEMENT_PAIR_A;
   this_request->type.pio.sat_protocol = sat_protocol;
   this_request->type.pio.sgl_pair_index = 0;
   if ((copy_rx_frame) || (sat_protocol == SAT_PROTOCOL_PIO_DATA_OUT))
   {
      scic_sds_request_build_sgl(&this_request->parent);
      this_request->type.pio.request_current.sgl_pair =
         &this_request->parent.task_context_buffer->sgl_pair_ab;
   }
   else
   {
      this_request->type.pio.request_current.sgl_pair = NULL;
   }
   sci_base_state_machine_construct(
      &this_request->parent.started_substate_machine,
      &this_request->parent.parent.parent,
      scic_sds_stp_request_started_pio_substate_table,
      SCIC_SDS_STP_REQUEST_STARTED_PIO_AWAIT_H2D_COMPLETION_SUBSTATE
   );
   return SCI_SUCCESS;
}
SCI_STATUS scic_sds_stp_pio_request_construct ( SCIC_SDS_REQUEST_T * scic_io_request , U8 sat_protocol , BOOL copy_rx_frame ) { SCIC_SDS_STP_REQUEST_T * this_request ; this_request = ( SCIC_SDS_STP_REQUEST_T * ) scic_io_request ; scic_sds_stp_non_ncq_request_construct ( & this_request -> parent ) ; scu_stp_raw_request_construct_task_context ( this_request , this_request -> parent . task_context_buffer ) ; this_request -> type . pio . current_transfer_bytes = 0 ; this_request -> type . pio . ending_error = 0 ; this_request -> type . pio . ending_status = 0 ; this_request -> type . pio . request_current . sgl_offset = 0 ; this_request -> type . pio . request_current . sgl_set = SCU_SGL_ELEMENT_PAIR_A ; this_request -> type . pio . sat_protocol = sat_protocol ; this_request -> type . pio . sgl_pair_index = 0 ; if ( ( copy_rx_frame ) || ( sat_protocol == SAT_PROTOCOL_PIO_DATA_OUT ) ) { scic_sds_request_build_sgl ( & this_request -> parent ) ; this_request -> type . pio . request_current . sgl_pair = & this_request -> parent . task_context_buffer -> sgl_pair_ab ; } else { this_request -> type . pio . request_current . sgl_pair = NULL ; } sci_base_state_machine_construct ( & this_request -> parent . started_substate_machine , & this_request -> parent . parent . parent , scic_sds_stp_request_started_pio_substate_table , SCIC_SDS_STP_REQUEST_STARTED_PIO_AWAIT_H2D_COMPLETION_SUBSTATE ) ; return SCI_SUCCESS ; }
This method will construct the SATA PIO request.
This method will construct the SATA PIO request .
// Since the IO request copy of the TC contains the same data as // the actual TC this pointer is vaild for either. // The user does not want the data copied to the SGL buffer location