FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * This method is called when the SCIC_SDS_CONTROLLER is in the ready state
 * and the terminate request handler is called.
 *    - call the io request terminate function
 *    - if successful
 *       - post the terminate request to the SCU hardware
 *
 * @param[in] controller This is SCI_BASE_CONTROLLER object which is cast
 *       into a SCIC_SDS_CONTROLLER object.
 * @param[in] remote_device This is SCI_BASE_REMOTE_DEVICE which is cast to a
 *       SCIC_SDS_REMOTE_DEVICE object.
 * @param[in] io_request This is the SCI_BASE_REQUEST which is cast to a
 *       SCIC_SDS_IO_REQUEST object.
 *
 * @return SCI_STATUS
 * @retval SCI_SUCCESS if the start io operation succeeds
 * @retval SCI_FAILURE_INVALID_STATE if one or more objects are not in a valid
 *         state to accept io requests.
 */
This method is called when the SCIC_SDS_CONTROLLER is in the ready state
and the terminate request handler is called.
- call the io request terminate function
- if successful
- post the terminate request to the SCU hardware

@param[in] controller This is SCI_BASE_CONTROLLER object which is cast
into a SCIC_SDS_CONTROLLER object.
@param[in] remote_device This is SCI_BASE_REMOTE_DEVICE which is cast to a
SCIC_SDS_REMOTE_DEVICE object.
@param[in] io_request This is the SCI_BASE_REQUEST which is cast to a
SCIC_SDS_IO_REQUEST object.

@return SCI_STATUS
@retval SCI_SUCCESS if the start io operation succeeds
@retval SCI_FAILURE_INVALID_STATE if one or more objects are not in a valid
state to accept io requests.
This method is called when the SCIC_SDS_CONTROLLER is in the ready state and the terminate request handler is called . - call the io request terminate function - if successful - post the terminate request to the SCU hardware @param [ in ] controller This is SCI_BASE_CONTROLLER object which is cast into a SCIC_SDS_CONTROLLER object . @param [ in ] remote_device This is SCI_BASE_REMOTE_DEVICE which is cast to a SCIC_SDS_REMOTE_DEVICE object . @param [ in ] io_request This is the SCI_BASE_REQUEST which is cast to a SCIC_SDS_IO_REQUEST object . @return SCI_STATUS @retval SCI_SUCCESS if the start io operation succeeds @retval SCI_FAILURE_INVALID_STATE if one or more objects are not in a valid state to accept io requests .
static
SCI_STATUS scic_sds_controller_ready_state_terminate_request_handler(
   SCI_BASE_CONTROLLER_T    *controller,
   SCI_BASE_REMOTE_DEVICE_T *remote_device,
   SCI_BASE_REQUEST_T       *io_request
)
{
   SCIC_SDS_CONTROLLER_T    *this_controller = (SCIC_SDS_CONTROLLER_T *)
                                               controller;
   SCIC_SDS_REQUEST_T       *the_request     = (SCIC_SDS_REQUEST_T *)
                                               io_request;
   SCI_STATUS                status;
   status = scic_sds_io_request_terminate(the_request);
   if (status == SCI_SUCCESS)
   {
      scic_sds_controller_post_request(
         this_controller,
         scic_sds_request_get_post_context(the_request)
         | SCU_CONTEXT_COMMAND_REQUEST_POST_TC_ABORT
      );
   }
   return status;
}
static SCI_STATUS scic_sds_controller_ready_state_terminate_request_handler ( SCI_BASE_CONTROLLER_T * controller , SCI_BASE_REMOTE_DEVICE_T * remote_device , SCI_BASE_REQUEST_T * io_request ) { SCIC_SDS_CONTROLLER_T * this_controller = ( SCIC_SDS_CONTROLLER_T * ) controller ; SCIC_SDS_REQUEST_T * the_request = ( SCIC_SDS_REQUEST_T * ) io_request ; SCI_STATUS status ; status = scic_sds_io_request_terminate ( the_request ) ; if ( status == SCI_SUCCESS ) { scic_sds_controller_post_request ( this_controller , scic_sds_request_get_post_context ( the_request ) | SCU_CONTEXT_COMMAND_REQUEST_POST_TC_ABORT ) ; } return status ; }
This method is called when the SCIC_SDS_CONTROLLER is in the ready state
 and the terminate request handler is called.
This method is called when the SCIC_SDS_CONTROLLER is in the ready state and the terminate request handler is called .
// Utilize the original post context command and or in the POST_TC_ABORT // request sub-type.