/** * @brief */ void scic_sds_remote_node_context_construct( SCIC_SDS_REMOTE_DEVICE_T * device, SCIC_SDS_REMOTE_NODE_CONTEXT_T * rnc, U16 remote_node_index ) { memset (rnc, 0, sizeof(SCIC_SDS_REMOTE_NODE_CONTEXT_T) ); rnc->remote_node_index = remote_node_index; rnc->device = device; rnc->destination_state = SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_UNSPECIFIED; rnc->parent.logger = device->parent.parent.logger; sci_base_state_machine_construct( &rnc->state_machine, &rnc->parent, scic_sds_remote_node_context_state_table, SCIC_SDS_REMOTE_NODE_CONTEXT_INITIAL_STATE ); sci_base_state_machine_start(&rnc->state_machine); // State logging initialization takes place late for the remote node context // see the resume state handler for the initial state. }
/** * @brief This method implements the actions taken when entering the * READY state. Currently this method simply starts the * sub-state machine. * * @param[in] object This parameter specifies the base object for which * the state transition is occurring. This is cast into a * SCIF_SAS_REMOTE_DEVICE object in the method implementation. * * @return none */ static void scif_sas_remote_device_ready_state_enter( SCI_BASE_OBJECT_T *object ) { SCIF_SAS_REMOTE_DEVICE_T * fw_device = (SCIF_SAS_REMOTE_DEVICE_T *)object; // Transition immediately into the operational sub-state. sci_base_state_machine_start(&fw_device->ready_substate_machine); #if defined(DISABLE_WIDE_PORTED_TARGETS) scif_sas_domain_remote_device_start_complete(fw_device->domain,fw_device); #endif }
void sci_base_phy_construct( SCI_BASE_PHY_T *this_phy, SCI_BASE_LOGGER_T *logger, SCI_BASE_STATE_T *state_table ) { sci_base_object_construct(&this_phy->parent, logger); sci_base_state_machine_construct( &this_phy->state_machine, &this_phy->parent, state_table, SCI_BASE_PHY_STATE_INITIAL ); sci_base_state_machine_start( &this_phy->state_machine ); }
void sci_base_port_construct( SCI_BASE_PORT_T *this_port, SCI_BASE_LOGGER_T *logger, SCI_BASE_STATE_T *state_table ) { sci_base_object_construct(&this_port->parent, logger); sci_base_state_machine_construct( &this_port->state_machine, &this_port->parent, state_table, SCI_BASE_PORT_STATE_STOPPED ); sci_base_state_machine_start( &this_port->state_machine ); }
void sci_base_domain_construct( SCI_BASE_DOMAIN_T * this_domain, SCI_BASE_LOGGER_T * logger, SCI_BASE_STATE_T * state_table ) { sci_base_object_construct(&this_domain->parent, logger); sci_base_state_machine_construct( &this_domain->state_machine, &this_domain->parent, state_table, SCI_BASE_DOMAIN_STATE_INITIAL ); sci_base_state_machine_start( &this_domain->state_machine ); }
/** * @brief This method implements the actions taken when entering the * STARTING state. This method will attempt to start the core * remote device and will kick-start the starting sub-state machine * if no errors are encountered. * * @param[in] object This parameter specifies the base object for which * the state transition is occurring. This is cast into a * SCIF_SAS_REMOTE_DEVICE object in the method implementation. * * @return none */ static void scif_sas_remote_device_starting_state_enter( SCI_BASE_OBJECT_T *object ) { SCIF_SAS_REMOTE_DEVICE_T * fw_device = (SCIF_SAS_REMOTE_DEVICE_T *)object; SET_STATE_HANDLER( fw_device, scif_sas_remote_device_state_handler_table, SCI_BASE_REMOTE_DEVICE_STATE_STARTING ); SCIF_LOG_INFO(( sci_base_object_get_logger(fw_device), SCIF_LOG_OBJECT_REMOTE_DEVICE | SCIF_LOG_OBJECT_REMOTE_DEVICE_CONFIG, "RemoteDevice:0x%x starting/configuring\n", fw_device )); fw_device->destination_state = SCIF_SAS_REMOTE_DEVICE_DESTINATION_STATE_READY; sci_base_state_machine_start(&fw_device->starting_substate_machine); fw_device->operation_status = scic_remote_device_start( fw_device->core_object, SCIF_SAS_REMOTE_DEVICE_CORE_OP_TIMEOUT ); if (fw_device->operation_status != SCI_SUCCESS) { fw_device->state_handlers->parent.fail_handler(&fw_device->parent); // Something is seriously wrong. Starting the core remote device // shouldn't fail in anyway in this state. scif_cb_controller_error(fw_device->domain->controller, SCI_CONTROLLER_REMOTE_DEVICE_ERROR); } }
void sci_base_remote_device_construct( SCI_BASE_REMOTE_DEVICE_T *this_device, SCI_BASE_LOGGER_T *logger, SCI_BASE_STATE_T *state_table ) { sci_base_object_construct( &this_device->parent, logger ); sci_base_state_machine_construct( &this_device->state_machine, &this_device->parent, state_table, SCI_BASE_REMOTE_DEVICE_STATE_INITIAL ); sci_base_state_machine_start( &this_device->state_machine ); }
void sci_base_request_construct( SCI_BASE_REQUEST_T *this_request, SCI_BASE_LOGGER_T *my_logger, SCI_BASE_STATE_T *my_state_table ) { sci_base_object_construct( &this_request->parent, my_logger ); sci_base_state_machine_construct( &this_request->state_machine, &this_request->parent, my_state_table, SCI_BASE_REQUEST_STATE_INITIAL ); sci_base_state_machine_start( &this_request->state_machine ); }