FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * @brief This is the method provided to handle a MSIX message for a normal
 *        completion.
 *
 * @param[in] controller
 *
 * @return BOOL
 * @retval TRUE if an interrupt is processed
 *         FALSE if no interrupt was processed
 */
@brief This is the method provided to handle a MSIX message for a normal
completion.

@param[in] controller

@return BOOL
@retval TRUE if an interrupt is processed
FALSE if no interrupt was processed
@brief This is the method provided to handle a MSIX message for a normal completion . @param [ in ] controller @return BOOL @retval TRUE if an interrupt is processed FALSE if no interrupt was processed
static
BOOL scic_sds_controller_normal_vector_interrupt_handler(
   SCI_CONTROLLER_HANDLE_T controller
)
{
   SCIC_SDS_CONTROLLER_T *this_controller;
   this_controller = (SCIC_SDS_CONTROLLER_T *)controller;
   if (scic_sds_controller_completion_queue_has_entries(this_controller))
   {
      return TRUE;
   }
   else
   {
      SMU_ISR_WRITE(this_controller, SMU_ISR_COMPLETION);
      SMU_IMR_WRITE(this_controller, 0xFF000000);
      SMU_IMR_WRITE(this_controller, 0x00000000);
   }
   return FALSE;
}
static BOOL scic_sds_controller_normal_vector_interrupt_handler ( SCI_CONTROLLER_HANDLE_T controller ) { SCIC_SDS_CONTROLLER_T * this_controller ; this_controller = ( SCIC_SDS_CONTROLLER_T * ) controller ; if ( scic_sds_controller_completion_queue_has_entries ( this_controller ) ) { return TRUE ; } else { SMU_ISR_WRITE ( this_controller , SMU_ISR_COMPLETION ) ; SMU_IMR_WRITE ( this_controller , 0xFF000000 ) ; SMU_IMR_WRITE ( this_controller , 0x00000000 ) ; } return FALSE ; }
@brief This is the method provided to handle a MSIX message for a normal
        completion.
@brief This is the method provided to handle a MSIX message for a normal completion .
// we have a spurious interrupt it could be that we have already // emptied the completion queue from a previous interrupt // There is a race in the hardware that could cause us not to be notified // of an interrupt completion if we do not take this step.  We will mask // then unmask the interrupts so if there is another interrupt pending // the clearing of the interrupt source we get the next interrupt message.