FreeBSD/sys/dev/isci/scil/scif_sas_remote_device_state_handlers.c
/**
 * @brief This method provides STOPPED state specific handling for
 *        when the framework attempts to start the remote device.  This
 *        method attempts to transition the state machine into the
 *        STARTING state.  If this is unsuccessful, then there is a direct
 *        transition into the FAILED state.
 *
 * @param[in]  remote_device This parameter specifies the remote device
 *             object for which the framework is attempting to start.
 *
 * @return This method returns an indication as to whether the start
 *         operating began successfully.
 */
@brief This method provides STOPPED state specific handling for
when the framework attempts to start the remote device.  This
method attempts to transition the state machine into the
STARTING state.  If this is unsuccessful, then there is a direct
transition into the FAILED state.

@param[in]  remote_device This parameter specifies the remote device
object for which the framework is attempting to start.

@return This method returns an indication as to whether the start
operating began successfully.
@brief This method provides STOPPED state specific handling for when the framework attempts to start the remote device . This method attempts to transition the state machine into the STARTING state . If this is unsuccessful then there is a direct transition into the FAILED state . @param [ in ] remote_device This parameter specifies the remote device object for which the framework is attempting to start . @return This method returns an indication as to whether the start operating began successfully .
static
SCI_STATUS scif_sas_remote_device_stopped_start_handler(
   SCI_BASE_REMOTE_DEVICE_T * remote_device
)
{
   SCIF_SAS_REMOTE_DEVICE_T * fw_device = (SCIF_SAS_REMOTE_DEVICE_T *)
                                          remote_device;
   sci_base_state_machine_change_state(
      &fw_device->parent.state_machine, SCI_BASE_REMOTE_DEVICE_STATE_STARTING
   );
   if (sci_base_state_machine_get_state(&fw_device->parent.state_machine)
       == SCI_BASE_REMOTE_DEVICE_STATE_FAILED)
   {
      SCIF_LOG_WARNING((
         sci_base_object_get_logger(fw_device),
         SCIF_LOG_OBJECT_REMOTE_DEVICE | SCIF_LOG_OBJECT_DOMAIN_DISCOVERY,
         "Domain:0x%x Device:0x%x Status:0x%x failed to start\n",
         fw_device->domain, fw_device, fw_device->operation_status
      ));
   }
   return fw_device->operation_status;
}
static SCI_STATUS scif_sas_remote_device_stopped_start_handler ( SCI_BASE_REMOTE_DEVICE_T * remote_device ) { SCIF_SAS_REMOTE_DEVICE_T * fw_device = ( SCIF_SAS_REMOTE_DEVICE_T * ) remote_device ; sci_base_state_machine_change_state ( & fw_device -> parent . state_machine , SCI_BASE_REMOTE_DEVICE_STATE_STARTING ) ; if ( sci_base_state_machine_get_state ( & fw_device -> parent . state_machine ) == SCI_BASE_REMOTE_DEVICE_STATE_FAILED ) { SCIF_LOG_WARNING ( ( sci_base_object_get_logger ( fw_device ) , SCIF_LOG_OBJECT_REMOTE_DEVICE | SCIF_LOG_OBJECT_DOMAIN_DISCOVERY , " \n " , fw_device -> domain , fw_device , fw_device -> operation_status ) ) ; } return fw_device -> operation_status ; }
@brief This method provides STOPPED state specific handling for
        when the framework attempts to start the remote device.
@brief This method provides STOPPED state specific handling for when the framework attempts to start the remote device .
// Check to see if the state transition occurred without issue.