FreeBSD/sys/dev/isci/scil/scif_sas_controller_state_handlers.c
/**
 * @brief This method continue to stop the controller after clear affiliation
 *        is done.
 *
 * @param[in] fw_controller This parameter specifies the framework
 *            controller object to be stopped.
 *
 * @return This method returns a value indicating if the operation succeeded.
 * @retval SCI_SUCCESS This value indicates the controller_stop succeeds.
 * @retval SCI_FAILURE This value indicates certain failure during the process
 *            of stopping controller.
 */
@brief This method continue to stop the controller after clear affiliation
is done.

@param[in] fw_controller This parameter specifies the framework
controller object to be stopped.

@return This method returns a value indicating if the operation succeeded.
@retval SCI_SUCCESS This value indicates the controller_stop succeeds.
@retval SCI_FAILURE This value indicates certain failure during the process
of stopping controller.
@brief This method continue to stop the controller after clear affiliation is done . @param [ in ] fw_controller This parameter specifies the framework controller object to be stopped . @return This method returns a value indicating if the operation succeeded . @retval SCI_SUCCESS This value indicates the controller_stop succeeds . @retval SCI_FAILURE This value indicates certain failure during the process of stopping controller .
SCI_STATUS scif_sas_controller_continue_to_stop(
   SCIF_SAS_CONTROLLER_T * fw_controller
)
{
   SCI_STATUS status;
   SCIF_LOG_TRACE((
      sci_base_object_get_logger(fw_controller),
      SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_SHUTDOWN,
      "scif_sas_controller_continue_to_stop (0x%x).\n",
      fw_controller
   ));
   status = scif_sas_controller_stop_domains(fw_controller);
   if (status == SCI_SUCCESS)
   {
      status = scic_controller_stop(fw_controller->core_object, 0);
      if (status != SCI_SUCCESS)
      {
         SCIF_LOG_ERROR((
            sci_base_object_get_logger(fw_controller),
            SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_SHUTDOWN,
            "Controller:0x%x Status:0x%x unable to stop controller.\n",
            fw_controller, status
         ));
         sci_base_state_machine_change_state(
            &fw_controller->parent.state_machine,
            SCI_BASE_CONTROLLER_STATE_FAILED
         );
      }
   }
   else
   {
      SCIF_LOG_ERROR((
         sci_base_object_get_logger(fw_controller),
         SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_SHUTDOWN,
         "Controller:0x%x Status:0x%x unable to stop domains.\n",
         fw_controller, status
      ));
      sci_base_state_machine_change_state(
         &fw_controller->parent.state_machine,
         SCI_BASE_CONTROLLER_STATE_FAILED
      );
   }
   return status;
}
SCI_STATUS scif_sas_controller_continue_to_stop ( SCIF_SAS_CONTROLLER_T * fw_controller ) { SCI_STATUS status ; SCIF_LOG_TRACE ( ( sci_base_object_get_logger ( fw_controller ) , SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_SHUTDOWN , " \n " , fw_controller ) ) ; status = scif_sas_controller_stop_domains ( fw_controller ) ; if ( status == SCI_SUCCESS ) { status = scic_controller_stop ( fw_controller -> core_object , 0 ) ; if ( status != SCI_SUCCESS ) { SCIF_LOG_ERROR ( ( sci_base_object_get_logger ( fw_controller ) , SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_SHUTDOWN , " \n " , fw_controller , status ) ) ; sci_base_state_machine_change_state ( & fw_controller -> parent . state_machine , SCI_BASE_CONTROLLER_STATE_FAILED ) ; } } else { SCIF_LOG_ERROR ( ( sci_base_object_get_logger ( fw_controller ) , SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_SHUTDOWN , " \n " , fw_controller , status ) ) ; sci_base_state_machine_change_state ( & fw_controller -> parent . state_machine , SCI_BASE_CONTROLLER_STATE_FAILED ) ; } return status ; }
@brief This method continue to stop the controller after clear affiliation
        is done.
@brief This method continue to stop the controller after clear affiliation is done .
//stop all the domains and their remote devices. // Attempt to stop the core controller.