FreeBSD/sys/dev/isci/scil/scic_sds_remote_device.c
/**
 * This method is the default event handler.  It will call the RNC state
 * machine handler for any RNC events otherwise it will log a warning and
 * returns a failure.
 *
 * @param[in] device The SCI_BASE_REMOTE_DEVICE which is then cast into a
 *       SCIC_SDS_REMOTE_DEVICE.
 * @param[in] event_code The event code that the SCIC_SDS_CONTROLLER wants the
 *       device object to process.
 *
 * @return SCI_STATUS
 * @retval SCI_FAILURE_INVALID_STATE
 */
This method is the default event handler.  It will call the RNC state
machine handler for any RNC events otherwise it will log a warning and
returns a failure.

@param[in] device The SCI_BASE_REMOTE_DEVICE which is then cast into a
SCIC_SDS_REMOTE_DEVICE.
@param[in] event_code The event code that the SCIC_SDS_CONTROLLER wants the
device object to process.


This method is the default event handler . It will call the RNC state machine handler for any RNC events otherwise it will log a warning and returns a failure . @param [ in ] device The SCI_BASE_REMOTE_DEVICE which is then cast into a SCIC_SDS_REMOTE_DEVICE . @param [ in ] event_code The event code that the SCIC_SDS_CONTROLLER wants the device object to process .
static
SCI_STATUS  scic_sds_remote_device_core_event_handler(
   SCIC_SDS_REMOTE_DEVICE_T *this_device,
   U32                       event_code,
   BOOL                      is_ready_state
)
{
   SCI_STATUS status;
   switch (scu_get_event_type(event_code))
   {
   case SCU_EVENT_TYPE_RNC_OPS_MISC:
   case SCU_EVENT_TYPE_RNC_SUSPEND_TX:
   case SCU_EVENT_TYPE_RNC_SUSPEND_TX_RX:
      status = scic_sds_remote_node_context_event_handler(this_device->rnc, event_code);
   break;
   case SCU_EVENT_TYPE_PTX_SCHEDULE_EVENT:
       if( scu_get_event_code(event_code) == SCU_EVENT_IT_NEXUS_TIMEOUT )
       {
           status = SCI_SUCCESS;
           scic_sds_remote_node_context_suspend( this_device->rnc,
                                                 SCI_SOFTWARE_SUSPENSION,
                                                 NULL, NULL );
           scic_sds_emit_event_log_message(
              this_device, event_code,
                   (is_ready_state)
            ? "I_T_Nexus_Timeout event"
            : "I_T_Nexus_Timeout event in wrong state",
                   is_ready_state );
           break;
       }
   default:
      scic_sds_emit_event_log_message( this_device, event_code,
                                       (is_ready_state)
                                          ? "unexpected event"
                                          : "unexpected event in wrong state",
                                       is_ready_state );
      status = SCI_FAILURE_INVALID_STATE;
   break;
   }
   return status;
}
static SCI_STATUS scic_sds_remote_device_core_event_handler ( SCIC_SDS_REMOTE_DEVICE_T * this_device , U32 event_code , BOOL is_ready_state ) { SCI_STATUS status ; switch ( scu_get_event_type ( event_code ) ) { case SCU_EVENT_TYPE_RNC_OPS_MISC : case SCU_EVENT_TYPE_RNC_SUSPEND_TX : case SCU_EVENT_TYPE_RNC_SUSPEND_TX_RX : status = scic_sds_remote_node_context_event_handler ( this_device -> rnc , event_code ) ; break ; case SCU_EVENT_TYPE_PTX_SCHEDULE_EVENT : if ( scu_get_event_code ( event_code ) == SCU_EVENT_IT_NEXUS_TIMEOUT ) { status = SCI_SUCCESS ; scic_sds_remote_node_context_suspend ( this_device -> rnc , SCI_SOFTWARE_SUSPENSION , NULL , NULL ) ; scic_sds_emit_event_log_message ( this_device , event_code , ( is_ready_state ) ? " " : " " , is_ready_state ) ; break ; } default : scic_sds_emit_event_log_message ( this_device , event_code , ( is_ready_state ) ? " " : " " , is_ready_state ) ; status = SCI_FAILURE_INVALID_STATE ; break ; } return status ; }
This method is the default event handler.
This method is the default event handler .
// Suspend the associated RNC // Else, fall through and treat as unhandled...