FreeBSD/sys/dev/isci/scil/scif_sas_controller_state_handlers.c
/**
 * @brief This method provides READY state specific handling for
 *        when a user attempts to stop a controller.
 *
 * @param[in]  controller This parameter specifies the controller object
 *             on which the user is attempting to perform a stop
 *             operation.
 * @param[in]  timeout This parameter specifies the timeout value (in
 *             milliseconds) to be utilized for this operation.
 *
 * @return This method returns an indication of whether the stop operation
 *         succeeded.
 * @retval SCI_SUCCESS This value is returned when the stop operation
 *         begins successfully.
 */
@brief This method provides READY state specific handling for
when a user attempts to stop a controller.

@param[in]  controller This parameter specifies the controller object
on which the user is attempting to perform a stop
operation.
@param[in]  timeout This parameter specifies the timeout value (in
milliseconds) to be utilized for this operation.

@return This method returns an indication of whether the stop operation
succeeded.
@retval SCI_SUCCESS This value is returned when the stop operation
begins successfully.
@brief This method provides READY state specific handling for when a user attempts to stop a controller . @param [ in ] controller This parameter specifies the controller object on which the user is attempting to perform a stop operation . @param [ in ] timeout This parameter specifies the timeout value ( in milliseconds ) to be utilized for this operation . @return This method returns an indication of whether the stop operation succeeded . @retval SCI_SUCCESS This value is returned when the stop operation begins successfully .
static
SCI_STATUS scif_sas_controller_ready_stop_handler(
   SCI_BASE_CONTROLLER_T * controller,
   U32                     timeout
)
{
   SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T *)controller;
   SCIF_LOG_TRACE((
      sci_base_object_get_logger(fw_controller),
      SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_INITIALIZATION,
      "scif_sas_controller_ready_stop_handler(0x%x, 0x%x) enter\n",
      controller, timeout
   ));
   sci_base_state_machine_change_state(
      &fw_controller->parent.state_machine,
      SCI_BASE_CONTROLLER_STATE_STOPPING
   );
   if (fw_controller->user_parameters.sas.clear_affiliation_during_controller_stop)
   {
      fw_controller->current_domain_to_clear_affiliation = 0;
      scif_sas_controller_clear_affiliation(fw_controller);
   }
   else
      scif_sas_controller_continue_to_stop(fw_controller);
   return SCI_SUCCESS;
}
static SCI_STATUS scif_sas_controller_ready_stop_handler ( SCI_BASE_CONTROLLER_T * controller , U32 timeout ) { SCIF_SAS_CONTROLLER_T * fw_controller = ( SCIF_SAS_CONTROLLER_T * ) controller ; SCIF_LOG_TRACE ( ( sci_base_object_get_logger ( fw_controller ) , SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_INITIALIZATION , " \n " , controller , timeout ) ) ; sci_base_state_machine_change_state ( & fw_controller -> parent . state_machine , SCI_BASE_CONTROLLER_STATE_STOPPING ) ; if ( fw_controller -> user_parameters . sas . clear_affiliation_during_controller_stop ) { fw_controller -> current_domain_to_clear_affiliation = 0 ; scif_sas_controller_clear_affiliation ( fw_controller ) ; } else scif_sas_controller_continue_to_stop ( fw_controller ) ; return SCI_SUCCESS ; }
@brief This method provides READY state specific handling for
        when a user attempts to stop a controller.
@brief This method provides READY state specific handling for when a user attempts to stop a controller .
//clear affiliation first. After the last domain finishes clearing //affiliation, it will call back to controller to continue to stop. //Must return SUCCESS at this point.