FreeBSD/sys/dev/isci/scil/scic_sds_remote_node_context.c
/**
* This method will handle the suspend requests from the ready state.
*
* @param[in] this_rnc The remote node context object being suspended.
* @param[in] the_callback The callback when the suspension is complete.
* @param[in] callback_parameter The parameter that is to be passed into the
*       callback.
*
* @return SCI_SUCCESS
*/
This method will handle the suspend requests from the ready state.
This method will handle the suspend requests from the ready state .
static
SCI_STATUS scic_sds_remote_node_context_ready_state_suspend_handler(
   SCIC_SDS_REMOTE_NODE_CONTEXT_T         * this_rnc,
   U32                                      suspend_type,
   SCIC_SDS_REMOTE_NODE_CONTEXT_CALLBACK   the_callback,
   void                                   * callback_parameter
)
{
   this_rnc->user_callback   = the_callback;
   this_rnc->user_cookie     = callback_parameter;
   this_rnc->suspension_code = suspend_type;
   if (suspend_type == SCI_SOFTWARE_SUSPENSION)
   {
      scic_sds_remote_device_post_request(
         this_rnc->device,
         SCU_CONTEXT_COMMAND_POST_RNC_SUSPEND_TX
            );
   }
   sci_base_state_machine_change_state(
      &this_rnc->state_machine,
      SCIC_SDS_REMOTE_NODE_CONTEXT_AWAIT_SUSPENSION_STATE
         );
   return SCI_SUCCESS;
}
static SCI_STATUS scic_sds_remote_node_context_ready_state_suspend_handler ( SCIC_SDS_REMOTE_NODE_CONTEXT_T * this_rnc , U32 suspend_type , SCIC_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback , void * callback_parameter ) { this_rnc -> user_callback = the_callback ; this_rnc -> user_cookie = callback_parameter ; this_rnc -> suspension_code = suspend_type ; if ( suspend_type == SCI_SOFTWARE_SUSPENSION ) { scic_sds_remote_device_post_request ( this_rnc -> device , SCU_CONTEXT_COMMAND_POST_RNC_SUSPEND_TX ) ; } sci_base_state_machine_change_state ( & this_rnc -> state_machine , SCIC_SDS_REMOTE_NODE_CONTEXT_AWAIT_SUSPENSION_STATE ) ; return SCI_SUCCESS ; }
This method will handle the suspend requests from the ready state.
This method will handle the suspend requests from the ready state .