FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * @brief This is the method provided to handle legacy completions it is
 *        expected that the SCI User will call this completion handler
 *        anytime the interrupt handler reports that it has handled an
 *        interrupt.
 *
 * @param[in] controller
 *
 * @return none
 */
@brief This is the method provided to handle legacy completions it is
expected that the SCI User will call this completion handler
anytime the interrupt handler reports that it has handled an
interrupt.

@param[in] controller

@return none
@brief This is the method provided to handle legacy completions it is expected that the SCI User will call this completion handler anytime the interrupt handler reports that it has handled an interrupt . @param [ in ] controller @return none
static
void scic_sds_controller_legacy_completion_handler(
   SCI_CONTROLLER_HANDLE_T controller
)
{
   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_legacy_completion_handler(0x%d) enter\n",
      controller
   ));
   scic_sds_controller_polling_completion_handler(controller);
   SMU_IMR_WRITE(this_controller, 0x00000000);
#ifdef IMR_READ_FENCE
   {
      volatile U32 int_mask_value = 0;
      ULONG count = 0;
      do
      {
         int_mask_value = SMU_IMR_READ(this_controler);
         if (count++ > 10)
         {
            #ifdef ALLOW_ENTER_DEBUGGER
            __debugbreak();
            #endif
            break;
         }
      } while (int_mask_value != 0);
   }
#endif
}
static void scic_sds_controller_legacy_completion_handler ( SCI_CONTROLLER_HANDLE_T controller ) { 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 ) ) ; scic_sds_controller_polling_completion_handler ( controller ) ; SMU_IMR_WRITE ( this_controller , 0x00000000 ) ; #ifdef IMR_READ_FENCE { volatile U32 int_mask_value = 0 ; ULONG count = 0 ; do { int_mask_value = SMU_IMR_READ ( this_controler ) ; if ( count ++ > 10 ) { #ifdef ALLOW_ENTER_DEBUGGER __debugbreak ( ) ; #endif break ; } } while ( int_mask_value != 0 ) ; } #endif }
@brief This is the method provided to handle legacy completions it is
        expected that the SCI User will call this completion handler
        anytime the interrupt handler reports that it has handled an
        interrupt.
@brief This is the method provided to handle legacy completions it is expected that the SCI User will call this completion handler anytime the interrupt handler reports that it has handled an interrupt .
/*
       * Temporary code since we have seen with legacy interrupts
       * that interrupts are still masked after clearing the mask
       * above. This may be an Arlington problem or it may be an
       * old driver problem.  Presently this code is turned off
       * since we have not seen this problem recently.
       */