Exemplo n.º 1
0
void scic_cb_timer_stop(
   SCI_CONTROLLER_HANDLE_T   controller,
   void                    * timer
)
{
   SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T *)
                                         sci_object_get_association(controller);

   scif_cb_timer_stop(fw_controller, timer);
}
Exemplo n.º 2
0
/**
 * @brief This callback method asks the user to destory the supplied timer.
 *
 * @param[in]  controller This parameter specifies the controller with
 *             which this timer is to associated.
 * @param[in]  timer This parameter specifies the timer to be destroyed.
 *
 * @return none
 */
void
scif_cb_timer_destroy(SCI_CONTROLLER_HANDLE_T scif_controller,
                      void *timer_handle)
{
    struct ISCI_CONTROLLER *isci_controller = (struct ISCI_CONTROLLER *)
            sci_object_get_association(scif_controller);

    scif_cb_timer_stop(scif_controller, timer_handle);
    sci_pool_put(isci_controller->timer_pool, (struct ISCI_TIMER *)timer_handle);

    isci_log_message(3, "TIMER", "destroy %p\n", timer_handle);
}
/**
 * @brief This methods takes care of completion of an internal request about its
 *        "internal" related feature, including the memory recycling and timer.
 *
 * @param[in] fw_controller The framework controller object.
 * @param[in] fw_internal_io The internal io to be completed.
 * @param[in] completion_status the completeion status by core and framework so
 *       far.
 *
 * @return none
 */
void scif_sas_internal_io_request_complete(
   SCIF_SAS_CONTROLLER_T          * fw_controller,
   SCIF_SAS_INTERNAL_IO_REQUEST_T * fw_internal_io,
   SCI_STATUS                       completion_status
)
{
   SCIF_LOG_TRACE((
      sci_base_object_get_logger(fw_controller),
      SCIF_LOG_OBJECT_IO_REQUEST,
      "scif_sas_internal_io_request_complete(0x%x, 0x%x, 0x%x) enter\n",
       fw_controller, fw_internal_io, completion_status
   ));

   scif_cb_timer_stop(fw_controller, fw_internal_io->internal_io_timer);
   scif_sas_internal_io_request_destruct(fw_controller, fw_internal_io);
}
Exemplo n.º 4
0
/**
 * @brief This method is called upon entrance to all states where the
 *        previous state may have been the DISCOVERING state.
 *        We issue the scif_cb_domain_discovery_complete() notification
 *        from this method, assuming pre-requisites are met, as opposed
 *        to in the exit handler of the DISCOVERING state, so that the
 *        appropriate state handlers are in place should the user decide
 *        to call scif_domain_discover() again.
 *
 * @param[in]  fw_domain This parameter specifies the domain for which
 *             the state transition has occurred.
 *
 * @return none
 */
static
void scif_sas_domain_transition_from_discovering_state(
   SCIF_SAS_DOMAIN_T * fw_domain
)
{
   SCIF_LOG_TRACE((
      sci_base_object_get_logger(fw_domain),
      SCIF_LOG_OBJECT_DOMAIN | SCIF_LOG_OBJECT_DOMAIN_DISCOVERY,
      "scif_sas_domain_transition_from_discovering_state(0x%x) enter\n",
      fw_domain
   ));

   if (fw_domain->parent.state_machine.previous_state_id
       == SCI_BASE_DOMAIN_STATE_DISCOVERING)
   {
      scif_sas_controller_restore_interrupt_coalescence(fw_domain->controller);

      scif_cb_timer_stop(fw_domain->controller, fw_domain->operation.timer);

      scif_cb_domain_discovery_complete(
         fw_domain->controller, fw_domain, fw_domain->operation.status
      );
   }
}