FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * @brief This method processes an SDMA completion event.  This is called
 *        from within the controller completion handler.
 *
 * @param[in] this_controller
 * @param[in] completion_entry
 *
 * @return none
 */
@brief This method processes an SDMA completion event.  This is called
from within the controller completion handler.



@return none
@brief This method processes an SDMA completion event . This is called from within the controller completion handler . @return none
static
void scic_sds_controller_sdma_completion(
   SCIC_SDS_CONTROLLER_T *this_controller,
   U32                   completion_entry
)
{
   U32 index;
   SCIC_SDS_REQUEST_T       *io_request;
   SCIC_SDS_REMOTE_DEVICE_T *device;
   index = SCU_GET_COMPLETION_INDEX(completion_entry);
   switch (scu_get_command_request_type(completion_entry))
   {
   case SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_TC:
   case SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_TC:
      io_request = this_controller->io_request_table[index];
      SCIC_LOG_ERROR((
         sci_base_object_get_logger(this_controller),
           SCIC_LOG_OBJECT_CONTROLLER
         | SCIC_LOG_OBJECT_SMP_IO_REQUEST
         | SCIC_LOG_OBJECT_SSP_IO_REQUEST
         | SCIC_LOG_OBJECT_STP_IO_REQUEST,
         "SCIC SDS Completion type SDMA %x for io request %x\n",
         completion_entry,
         io_request
      ));
      break;
   case SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_RNC:
   case SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC:
   case SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_RNC:
      device = this_controller->device_table[index];
      SCIC_LOG_ERROR((
         sci_base_object_get_logger(this_controller),
           SCIC_LOG_OBJECT_CONTROLLER
         | SCIC_LOG_OBJECT_SSP_REMOTE_TARGET
         | SCIC_LOG_OBJECT_SMP_REMOTE_TARGET
         | SCIC_LOG_OBJECT_STP_REMOTE_TARGET,
         "SCIC SDS Completion type SDMA %x for remote device %x\n",
         completion_entry,
         device
      ));
      break;
   default:
      SCIC_LOG_ERROR((
         sci_base_object_get_logger(this_controller),
         SCIC_LOG_OBJECT_CONTROLLER,
         "SCIC SDS Completion unknown SDMA completion type %x\n",
         completion_entry
      ));
      break;
   }
   sci_base_state_machine_change_state(
      scic_sds_controller_get_base_state_machine(this_controller),
      SCI_BASE_CONTROLLER_STATE_FAILED
   );
}
static void scic_sds_controller_sdma_completion ( SCIC_SDS_CONTROLLER_T * this_controller , U32 completion_entry ) { U32 index ; SCIC_SDS_REQUEST_T * io_request ; SCIC_SDS_REMOTE_DEVICE_T * device ; index = SCU_GET_COMPLETION_INDEX ( completion_entry ) ; switch ( scu_get_command_request_type ( completion_entry ) ) { case SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_TC : case SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_TC : io_request = this_controller -> io_request_table [ index ] ; SCIC_LOG_ERROR ( ( sci_base_object_get_logger ( this_controller ) , SCIC_LOG_OBJECT_CONTROLLER | SCIC_LOG_OBJECT_SMP_IO_REQUEST | SCIC_LOG_OBJECT_SSP_IO_REQUEST | SCIC_LOG_OBJECT_STP_IO_REQUEST , " \n " , completion_entry , io_request ) ) ; break ; case SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_RNC : case SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC : case SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_RNC : device = this_controller -> device_table [ index ] ; SCIC_LOG_ERROR ( ( sci_base_object_get_logger ( this_controller ) , SCIC_LOG_OBJECT_CONTROLLER | SCIC_LOG_OBJECT_SSP_REMOTE_TARGET | SCIC_LOG_OBJECT_SMP_REMOTE_TARGET | SCIC_LOG_OBJECT_STP_REMOTE_TARGET , " \n " , completion_entry , device ) ) ; break ; default : SCIC_LOG_ERROR ( ( sci_base_object_get_logger ( this_controller ) , SCIC_LOG_OBJECT_CONTROLLER , " \n " , completion_entry ) ) ; break ; } sci_base_state_machine_change_state ( scic_sds_controller_get_base_state_machine ( this_controller ) , SCI_BASE_CONTROLLER_STATE_FAILED ) ; }
@brief This method processes an SDMA completion event.
@brief This method processes an SDMA completion event .
/// @todo For a post TC operation we need to fail the IO request /// @todo For a port RNC operation we need to fail the device /// This is an unexpected completion type and is un-recoverable /// Transition to the failed state and wait for a controller reset