FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * @brief This method release resources in SCI controller.
 *
 * @param[in] this_controller This parameter specifies the core
 *            controller and associated objects whose resources are to be
 *            released.
 *
 * @return This method returns a value indicating if the operation succeeded.
 * @retval SCI_SUCCESS This value indicates that all the timers are destroyed.
 * @retval SCI_FAILURE This value indicates certain failure during the process
 *            of cleaning timer resource.
 */
@brief This method release resources in SCI controller.
@param[in] this_controller This parameter specifies the core
controller and associated objects whose resources are to be
released.

@return This method returns a value indicating if the operation succeeded.
@retval SCI_SUCCESS This value indicates that all the timers are destroyed.
@retval SCI_FAILURE This value indicates certain failure during the process
of cleaning timer resource.
@brief This method release resources in SCI controller . @param [ in ] this_controller This parameter specifies the core controller and associated objects whose resources are to be released . @return This method returns a value indicating if the operation succeeded . @retval SCI_SUCCESS This value indicates that all the timers are destroyed . @retval SCI_FAILURE This value indicates certain failure during the process of cleaning timer resource .
static
SCI_STATUS scic_sds_controller_release_resource(
   SCIC_SDS_CONTROLLER_T * this_controller
)
{
   SCIC_SDS_PORT_T * port;
   SCIC_SDS_PHY_T * phy;
   U8 index;
   SCIC_LOG_TRACE((
      sci_base_object_get_logger(this_controller),
      SCIC_LOG_OBJECT_CONTROLLER | SCIC_LOG_OBJECT_INITIALIZATION,
      "scic_sds_controller_release_resource(0x%x) enter\n",
      this_controller
   ));
   if(this_controller->phy_startup_timer != NULL)
   {
      scic_cb_timer_destroy(this_controller, this_controller->phy_startup_timer);
      this_controller->phy_startup_timer = NULL;
   }
   if(this_controller->power_control.timer != NULL)
   {
      scic_cb_timer_destroy(this_controller, this_controller->power_control.timer);
      this_controller->power_control.timer = NULL;
   }
   if(this_controller->timeout_timer != NULL)
   {
      scic_cb_timer_destroy(this_controller, this_controller->timeout_timer);
      this_controller->timeout_timer = NULL;
   }
   scic_sds_port_configuration_agent_release_resource(
      this_controller,
      &this_controller->port_agent);
   for(index = 0; index < SCI_MAX_PORTS+1; index++)
   {
      port = &this_controller->port_table[index];
      scic_sds_port_release_resource(this_controller, port);
   }
   for(index = 0; index < SCI_MAX_PHYS; index++)
   {
      phy = &this_controller->phy_table[index];
      scic_sds_phy_release_resource(this_controller, phy);
   }
   return SCI_SUCCESS;
}
static SCI_STATUS scic_sds_controller_release_resource ( SCIC_SDS_CONTROLLER_T * this_controller ) { SCIC_SDS_PORT_T * port ; SCIC_SDS_PHY_T * phy ; U8 index ; SCIC_LOG_TRACE ( ( sci_base_object_get_logger ( this_controller ) , SCIC_LOG_OBJECT_CONTROLLER | SCIC_LOG_OBJECT_INITIALIZATION , " \n " , this_controller ) ) ; if ( this_controller -> phy_startup_timer != NULL ) { scic_cb_timer_destroy ( this_controller , this_controller -> phy_startup_timer ) ; this_controller -> phy_startup_timer = NULL ; } if ( this_controller -> power_control . timer != NULL ) { scic_cb_timer_destroy ( this_controller , this_controller -> power_control . timer ) ; this_controller -> power_control . timer = NULL ; } if ( this_controller -> timeout_timer != NULL ) { scic_cb_timer_destroy ( this_controller , this_controller -> timeout_timer ) ; this_controller -> timeout_timer = NULL ; } scic_sds_port_configuration_agent_release_resource ( this_controller , & this_controller -> port_agent ) ; for ( index = 0 ; index < SCI_MAX_PORTS + 1 ; index ++ ) { port = & this_controller -> port_table [ index ] ; scic_sds_port_release_resource ( this_controller , port ) ; } for ( index = 0 ; index < SCI_MAX_PHYS ; index ++ ) { phy = & this_controller -> phy_table [ index ] ; scic_sds_phy_release_resource ( this_controller , phy ) ; } return SCI_SUCCESS ; }
@brief This method release resources in SCI controller.
@brief This method release resources in SCI controller .