FreeBSD/sys/dev/isci/scil/scic_sds_phy.c
/**
 * This method is called when an event notification is received for the phy
 * object when in the state SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_POWER.
 *    - decode the event
 *       - link failure events restart the starting state machine
 *       - any other events log a warning message and set a failure status
 *
 * @param[in] phy This SCIC_SDS_PHY object which has received an event.
 * @param[in] event_code This is the event code which the phy object is to
 *       decode.
 *
 * @return SCI_STATUS
 * @retval SCI_SUCCESS on a link failure event
 * @retval SCI_FAILURE on any unexpected event notifation
 */
This method is called when an event notification is received for the phy
object when in the state SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_POWER.
- decode the event
- link failure events restart the starting state machine
- any other events log a warning message and set a failure status

@param[in] phy This SCIC_SDS_PHY object which has received an event.
@param[in] event_code This is the event code which the phy object is to
decode.

@return SCI_STATUS
@retval SCI_SUCCESS on a link failure event
@retval SCI_FAILURE on any unexpected event notifation
This method is called when an event notification is received for the phy object when in the state SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_POWER . - decode the event - link failure events restart the starting state machine - any other events log a warning message and set a failure status @param [ in ] phy This SCIC_SDS_PHY object which has received an event . @param [ in ] event_code This is the event code which the phy object is to decode . @return SCI_STATUS @retval SCI_SUCCESS on a link failure event @retval SCI_FAILURE on any unexpected event notifation
static
SCI_STATUS scic_sds_phy_starting_substate_await_sas_power_event_handler(
   SCIC_SDS_PHY_T *this_phy,
   U32 event_code
)
{
   U32 result = SCI_SUCCESS;
   switch (scu_get_event_code(event_code))
   {
   case SCU_EVENT_LINK_FAILURE:
      scic_sds_phy_restart_starting_state(this_phy);
      break;
   default:
      SCIC_LOG_WARNING((
         sci_base_object_get_logger(this_phy),
         SCIC_LOG_OBJECT_PHY | SCIC_LOG_OBJECT_RECEIVED_EVENTS,
         "PHY starting substate machine received unexpected event_code %x\n",
         event_code
      ));
      result = SCI_FAILURE;
      break;
   }
   return result;
}
static SCI_STATUS scic_sds_phy_starting_substate_await_sas_power_event_handler ( SCIC_SDS_PHY_T * this_phy , U32 event_code ) { U32 result = SCI_SUCCESS ; switch ( scu_get_event_code ( event_code ) ) { case SCU_EVENT_LINK_FAILURE : scic_sds_phy_restart_starting_state ( this_phy ) ; break ; default : SCIC_LOG_WARNING ( ( sci_base_object_get_logger ( this_phy ) , SCIC_LOG_OBJECT_PHY | SCIC_LOG_OBJECT_RECEIVED_EVENTS , " \n " , event_code ) ) ; result = SCI_FAILURE ; break ; } return result ; }
This method is called when an event notification is received for the phy
 object when in the state SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_POWER.
This method is called when an event notification is received for the phy object when in the state SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_POWER .
// Link failure change state back to the starting state