FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * @brief This is the method provided to handle polling for interrupts
 *        for the controller object.
 *
 * @param[in] controller
 *
 * @return BOOL
 * @retval TRUE if an interrupt is to be processed
 * @retval FALSE if no interrupt was pending
 */
@brief This is the method provided to handle polling for interrupts
for the controller object.

@param[in] controller

@return BOOL
@retval TRUE if an interrupt is to be processed
@retval FALSE if no interrupt was pending
@brief This is the method provided to handle polling for interrupts for the controller object . @param [ in ] controller @return BOOL @retval TRUE if an interrupt is to be processed @retval FALSE if no interrupt was pending
static
BOOL scic_sds_controller_polling_interrupt_handler(
   SCI_CONTROLLER_HANDLE_T controller
)
{
   U32                    interrupt_status;
   SCIC_SDS_CONTROLLER_T *this_controller = (SCIC_SDS_CONTROLLER_T*)controller;
   SCIC_LOG_TRACE((
      sci_base_object_get_logger(controller),
      SCIC_LOG_OBJECT_CONTROLLER,
      "scic_sds_controller_polling_interrupt_handler(0x%d) enter\n",
      controller
   ));
   interrupt_status = SMU_ISR_READ(this_controller);
   if ((interrupt_status &
         (SMU_ISR_COMPLETION |
          SMU_ISR_QUEUE_ERROR |
          SMU_ISR_QUEUE_SUSPEND)) == 0)
   {
      return FALSE;
   }
   return scic_sds_controller_standard_interrupt_handler(
             controller, interrupt_status
          );
}
static BOOL scic_sds_controller_polling_interrupt_handler ( SCI_CONTROLLER_HANDLE_T controller ) { U32 interrupt_status ; SCIC_SDS_CONTROLLER_T * this_controller = ( SCIC_SDS_CONTROLLER_T * ) controller ; SCIC_LOG_TRACE ( ( sci_base_object_get_logger ( controller ) , SCIC_LOG_OBJECT_CONTROLLER , " \n " , controller ) ) ; interrupt_status = SMU_ISR_READ ( this_controller ) ; if ( ( interrupt_status & ( SMU_ISR_COMPLETION | SMU_ISR_QUEUE_ERROR | SMU_ISR_QUEUE_SUSPEND ) ) == 0 ) { return FALSE ; } return scic_sds_controller_standard_interrupt_handler ( controller , interrupt_status ) ; }
@brief This is the method provided to handle polling for interrupts
        for the controller object.
@brief This is the method provided to handle polling for interrupts for the controller object .
/*
    * In INTERRUPT_POLLING_MODE we exit the interrupt handler if the hardware
    * indicates nothing is pending. Since we are not being called from a real
    * interrupt, we don't want to confuse the hardware by servicing the
    * completion queue before the hardware indicates it is ready. We'll
    * simply wait for another polling interval and check again.
    */