FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * @brief This is the method provided to handle the error completions when
 *        the hardware is using two MSIX messages.
 *
 * @param[in] controller
 */
@brief This is the method provided to handle the error completions when
the hardware is using two MSIX messages.

@param[in] controller
@brief This is the method provided to handle the error completions when the hardware is using two MSIX messages . @param [ in ] controller
static
void scic_sds_controller_error_vector_completion_handler(
   SCI_CONTROLLER_HANDLE_T controller
)
{
   U32 interrupt_status;
   SCIC_SDS_CONTROLLER_T *this_controller;
   this_controller = (SCIC_SDS_CONTROLLER_T *)controller;
   SCIC_LOG_TRACE((
      sci_base_object_get_logger(controller),
      SCIC_LOG_OBJECT_CONTROLLER,
      "scic_sds_controller_error_vector_completion_handler(0x%d) enter\n",
      controller
   ));
   interrupt_status = SMU_ISR_READ(this_controller);
   if (
            (interrupt_status & SMU_ISR_QUEUE_SUSPEND)
         && scic_sds_controller_completion_queue_has_entries(this_controller)
      )
   {
      scic_sds_controller_process_completions(this_controller);
      SMU_ISR_WRITE(this_controller, SMU_ISR_QUEUE_SUSPEND);
   }
   else
   {
      SCIC_LOG_ERROR((
         sci_base_object_get_logger(this_controller),
         SCIC_LOG_OBJECT_CONTROLLER,
         "SCIC Controller reports CRC error on completion ISR %x\n",
         interrupt_status
      ));
      sci_base_state_machine_change_state(
         scic_sds_controller_get_base_state_machine(this_controller),
         SCI_BASE_CONTROLLER_STATE_FAILED
      );
      return;
   }
   SMU_IMR_WRITE(this_controller, 0x00000000);
}
static void scic_sds_controller_error_vector_completion_handler ( SCI_CONTROLLER_HANDLE_T controller ) { U32 interrupt_status ; SCIC_SDS_CONTROLLER_T * this_controller ; 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_QUEUE_SUSPEND ) && scic_sds_controller_completion_queue_has_entries ( this_controller ) ) { scic_sds_controller_process_completions ( this_controller ) ; SMU_ISR_WRITE ( this_controller , SMU_ISR_QUEUE_SUSPEND ) ; } else { SCIC_LOG_ERROR ( ( sci_base_object_get_logger ( this_controller ) , SCIC_LOG_OBJECT_CONTROLLER , " \n " , interrupt_status ) ) ; sci_base_state_machine_change_state ( scic_sds_controller_get_base_state_machine ( this_controller ) , SCI_BASE_CONTROLLER_STATE_FAILED ) ; return ; } SMU_IMR_WRITE ( this_controller , 0x00000000 ) ; }
@brief This is the method provided to handle the error completions when
        the hardware is using two MSIX messages.
@brief This is the method provided to handle the error completions when the hardware is using two MSIX messages .
// If we dont process any completions I am not sure that we want to do this. // We are in the middle of a hardware fault and should probably be reset.