FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * @brief This is the method provided to handle the error MSIX message
 *        interrupt.  This is the normal operating mode for the hardware if
 *        MSIX is enabled.
 *
 * @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 the error MSIX message
interrupt.  This is the normal operating mode for the hardware if
MSIX is enabled.

@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 the error MSIX message interrupt . This is the normal operating mode for the hardware if MSIX is enabled . @param [ in ] controller @return BOOL @retval TRUE if an interrupt is processed FALSE if no interrupt was processed
static
BOOL scic_sds_controller_error_vector_interrupt_handler(
   SCI_CONTROLLER_HANDLE_T controller
)
{
   U32 interrupt_status;
   SCIC_SDS_CONTROLLER_T *this_controller;
   this_controller = (SCIC_SDS_CONTROLLER_T *)controller;
   interrupt_status = SMU_ISR_READ(this_controller);
   interrupt_status &= (SMU_ISR_QUEUE_ERROR | SMU_ISR_QUEUE_SUSPEND);
   if (interrupt_status != 0)
   {
      return TRUE;
   }
   SMU_IMR_WRITE(this_controller, 0x000000FF);
   SMU_IMR_WRITE(this_controller, 0x00000000);
   return FALSE;
}
static BOOL scic_sds_controller_error_vector_interrupt_handler ( SCI_CONTROLLER_HANDLE_T controller ) { U32 interrupt_status ; SCIC_SDS_CONTROLLER_T * this_controller ; this_controller = ( SCIC_SDS_CONTROLLER_T * ) controller ; interrupt_status = SMU_ISR_READ ( this_controller ) ; interrupt_status &= ( SMU_ISR_QUEUE_ERROR | SMU_ISR_QUEUE_SUSPEND ) ; if ( interrupt_status != 0 ) { return TRUE ; } SMU_IMR_WRITE ( this_controller , 0x000000FF ) ; SMU_IMR_WRITE ( this_controller , 0x00000000 ) ; return FALSE ; }
@brief This is the method provided to handle the error MSIX message
        interrupt.
@brief This is the method provided to handle the error MSIX message interrupt .
// There is an error interrupt pending so let it through and handle // in the callback // 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 error interrupts so if there was another interrupt // pending we will be notified. // Could we write the value of (SMU_ISR_QUEUE_ERROR | SMU_ISR_QUEUE_SUSPEND)?