FreeBSD/sys/dev/isci/scil/scic_sds_stp_request.c
/**
 * This method processes a TC completion.  The expected TC completion is
 * for the transmission of the H2D register FIS containing the SATA/STP
 * non-data request.
 *
 * @param[in] this_request
 * @param[in] completion_code
 *
 * @return This method always successfully processes the TC completion.
 * @retval SCI_SUCCESS This value is always returned.
 */
This method processes a TC completion.  The expected TC completion is
for the transmission of the H2D register FIS containing the SATA/STP
non-data request.



@return This method always successfully processes the TC completion.
@retval SCI_SUCCESS This value is always returned.
This method processes a TC completion . The expected TC completion is for the transmission of the H2D register FIS containing the SATA / STP non - data request . @return This method always successfully processes the TC completion . @retval SCI_SUCCESS This value is always returned .
static
SCI_STATUS scic_sds_stp_request_soft_reset_await_h2d_diagnostic_tc_completion_handler(
   SCIC_SDS_REQUEST_T * this_request,
   U32                  completion_code
)
{
   SCIC_LOG_TRACE((
      sci_base_object_get_logger(this_request),
      SCIC_LOG_OBJECT_STP_IO_REQUEST,
      "scic_sds_stp_request_soft_reset_await_h2d_tc_completion_handler(0x%x, 0x%x) enter\n",
      this_request, completion_code
   ));
   switch (SCU_GET_COMPLETION_TL_STATUS(completion_code))
   {
   case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_GOOD):
      scic_sds_request_set_status(
         this_request, SCU_TASK_DONE_GOOD, SCI_SUCCESS
      );
      sci_base_state_machine_change_state(
         &this_request->started_substate_machine,
         SCIC_SDS_STP_REQUEST_STARTED_SOFT_RESET_AWAIT_D2H_RESPONSE_FRAME_SUBSTATE
      );
      break;
   default:
      scic_sds_request_set_status(
         this_request,
         SCU_NORMALIZE_COMPLETION_STATUS(completion_code),
         SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR
      );
      sci_base_state_machine_change_state(
         &this_request->parent.state_machine, SCI_BASE_REQUEST_STATE_COMPLETED
      );
      break;
   }
   return SCI_SUCCESS;
}
static SCI_STATUS scic_sds_stp_request_soft_reset_await_h2d_diagnostic_tc_completion_handler ( SCIC_SDS_REQUEST_T * this_request , U32 completion_code ) { SCIC_LOG_TRACE ( ( sci_base_object_get_logger ( this_request ) , SCIC_LOG_OBJECT_STP_IO_REQUEST , " \n " , this_request , completion_code ) ) ; switch ( SCU_GET_COMPLETION_TL_STATUS ( completion_code ) ) { case SCU_MAKE_COMPLETION_STATUS ( SCU_TASK_DONE_GOOD ) : scic_sds_request_set_status ( this_request , SCU_TASK_DONE_GOOD , SCI_SUCCESS ) ; sci_base_state_machine_change_state ( & this_request -> started_substate_machine , SCIC_SDS_STP_REQUEST_STARTED_SOFT_RESET_AWAIT_D2H_RESPONSE_FRAME_SUBSTATE ) ; break ; default : scic_sds_request_set_status ( this_request , SCU_NORMALIZE_COMPLETION_STATUS ( completion_code ) , SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR ) ; sci_base_state_machine_change_state ( & this_request -> parent . state_machine , SCI_BASE_REQUEST_STATE_COMPLETED ) ; break ; } return SCI_SUCCESS ; }
This method processes a TC completion.
This method processes a TC completion .
// All other completion status cause the IO to be complete.  If a NAK // was received, then it is up to the user to retry the request.