FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * @brief This method provides standard (common) processing of interrupts
 *        for polling and legacy based interrupts.
 *
 * @param[in] controller
 * @param[in] interrupt_status
 *
 * @return This method returns a boolean (BOOL) indication as to
 *         whether an completions are pending to be processed.
 * @retval TRUE if an interrupt is to be processed
 * @retval FALSE if no interrupt was pending
 */
@brief This method provides standard (common) processing of interrupts
for polling and legacy based interrupts.

@param[in] controller
@param[in] interrupt_status

@return This method returns a boolean (BOOL) indication as to
whether an completions are pending to be processed.
@retval TRUE if an interrupt is to be processed
@retval FALSE if no interrupt was pending
@brief This method provides standard ( common ) processing of interrupts for polling and legacy based interrupts . @param [ in ] controller @param [ in ] interrupt_status @return This method returns a boolean ( BOOL ) indication as to whether an completions are pending to be processed . @retval TRUE if an interrupt is to be processed @retval FALSE if no interrupt was pending
static
BOOL scic_sds_controller_standard_interrupt_handler(
   SCIC_SDS_CONTROLLER_T *this_controller,
   U32                    interrupt_status
)
{
   BOOL  is_completion_needed = FALSE;
   SCIC_LOG_TRACE((
      sci_base_object_get_logger(this_controller),
      SCIC_LOG_OBJECT_CONTROLLER,
      "scic_sds_controller_standard_interrupt_handler(0x%d,0x%d) enter\n",
      this_controller, interrupt_status
   ));
   if (
         (interrupt_status & SMU_ISR_QUEUE_ERROR)
      || (
            (interrupt_status & SMU_ISR_QUEUE_SUSPEND)
         && (!scic_sds_controller_completion_queue_has_entries(this_controller))
         )
      )
   {
      is_completion_needed = TRUE;
      this_controller->encountered_fatal_error = TRUE;
   }
   if (scic_sds_controller_completion_queue_has_entries(this_controller))
   {
      is_completion_needed = TRUE;
   }
   return is_completion_needed;
}
static BOOL scic_sds_controller_standard_interrupt_handler ( SCIC_SDS_CONTROLLER_T * this_controller , U32 interrupt_status ) { BOOL is_completion_needed = FALSE ; SCIC_LOG_TRACE ( ( sci_base_object_get_logger ( this_controller ) , SCIC_LOG_OBJECT_CONTROLLER , " \n " , this_controller , interrupt_status ) ) ; if ( ( interrupt_status & SMU_ISR_QUEUE_ERROR ) || ( ( interrupt_status & SMU_ISR_QUEUE_SUSPEND ) && ( ! scic_sds_controller_completion_queue_has_entries ( this_controller ) ) ) ) { is_completion_needed = TRUE ; this_controller -> encountered_fatal_error = TRUE ; } if ( scic_sds_controller_completion_queue_has_entries ( this_controller ) ) { is_completion_needed = TRUE ; } return is_completion_needed ; }
@brief This method provides standard (common) processing of interrupts
        for polling and legacy based interrupts.
@brief This method provides standard ( common ) processing of interrupts for polling and legacy based interrupts .
// We have a fatal error on the read of the completion queue bar // OR // We have a fatal error there is nothing in the completion queue // but we have a report from the hardware that the queue is full /// @todo how do we request the a controller reset