FreeBSD/sys/dev/isci/scil/scic_sds_stp_request.c
/**
 * This method will handle any link layer events while waiting for the data
 * frame.
 *
 * @param[in] request This is the request which is receiving the event.
 * @param[in] event_code This is the event code that the request on which the
 *       request is expected to take action.
 *
 * @return SCI_STATUS
 * @retval SCI_SUCCESS
 * @retval SCI_FAILURE
 */
This method will handle any link layer events while waiting for the data
frame.

@param[in] request This is the request which is receiving the event.
@param[in] event_code This is the event code that the request on which the
request is expected to take action.


This method will handle any link layer events while waiting for the data frame . @param [ in ] request This is the request which is receiving the event . @param [ in ] event_code This is the event code that the request on which the request is expected to take action .
static
SCI_STATUS scic_sds_stp_request_pio_data_in_await_data_event_handler(
   SCIC_SDS_REQUEST_T * request,
   U32                  event_code
)
{
   SCI_STATUS status;
   switch (scu_get_event_specifier(event_code))
   {
   case SCU_TASK_DONE_CRC_ERR << SCU_EVENT_SPECIFIC_CODE_SHIFT:
      sci_base_state_machine_change_state(
         &request->started_substate_machine,
         SCIC_SDS_STP_REQUEST_STARTED_PIO_AWAIT_FRAME_SUBSTATE
      );
      status = SCI_SUCCESS;
      break;
   default:
      SCIC_LOG_ERROR((
         sci_base_object_get_logger(request),
         SCIC_LOG_OBJECT_STP_IO_REQUEST,
         "SCIC PIO Request 0x%x received unexpected event 0x%08x\n",
         request, event_code
      ));
      status = SCI_FAILURE;
      break;
   }
   return status;
}
static SCI_STATUS scic_sds_stp_request_pio_data_in_await_data_event_handler ( SCIC_SDS_REQUEST_T * request , U32 event_code ) { SCI_STATUS status ; switch ( scu_get_event_specifier ( event_code ) ) { case SCU_TASK_DONE_CRC_ERR << SCU_EVENT_SPECIFIC_CODE_SHIFT : sci_base_state_machine_change_state ( & request -> started_substate_machine , SCIC_SDS_STP_REQUEST_STARTED_PIO_AWAIT_FRAME_SUBSTATE ) ; status = SCI_SUCCESS ; break ; default : SCIC_LOG_ERROR ( ( sci_base_object_get_logger ( request ) , SCIC_LOG_OBJECT_STP_IO_REQUEST , " \n " , request , event_code ) ) ; status = SCI_FAILURE ; break ; } return status ; }
This method will handle any link layer events while waiting for the data
 frame.
This method will handle any link layer events while waiting for the data frame .
// We are waiting for data and the SCU has R_ERR the data frame. // Go back to waiting for the D2H Register FIS /// @todo Should we fail the PIO request when we get an unexpected event?