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 complete io handler is called.
 *    - Complete the io request on the remote device
 *    - if successful
 *       - remove the io_request to the io_request_table
 *
 * @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 complete io handler is called.
- Complete the io request on the remote device
- if successful
- remove the io_request to the io_request_table

@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 complete io handler is called . - Complete the io request on the remote device - if successful - remove the io_request to the io_request_table @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_complete_io_handler(
   SCI_BASE_CONTROLLER_T    *controller,
   SCI_BASE_REMOTE_DEVICE_T *remote_device,
   SCI_BASE_REQUEST_T       *io_request
)
{
   U16        index;
   SCI_STATUS status;
   SCIC_SDS_CONTROLLER_T    *this_controller;
   SCIC_SDS_REQUEST_T       *the_request;
   SCIC_SDS_REMOTE_DEVICE_T *the_device;
   this_controller = (SCIC_SDS_CONTROLLER_T *)controller;
   the_request = (SCIC_SDS_REQUEST_T *)io_request;
   the_device = (SCIC_SDS_REMOTE_DEVICE_T *)remote_device;
   status = scic_sds_remote_device_complete_io(
                  this_controller, the_device, the_request);
   if (status == SCI_SUCCESS)
   {
      index = scic_sds_io_tag_get_index(the_request->io_tag);
      this_controller->io_request_table[index] = SCI_INVALID_HANDLE;
   }
   return status;
}
static SCI_STATUS scic_sds_controller_ready_state_complete_io_handler ( SCI_BASE_CONTROLLER_T * controller , SCI_BASE_REMOTE_DEVICE_T * remote_device , SCI_BASE_REQUEST_T * io_request ) { U16 index ; SCI_STATUS status ; SCIC_SDS_CONTROLLER_T * this_controller ; SCIC_SDS_REQUEST_T * the_request ; SCIC_SDS_REMOTE_DEVICE_T * the_device ; this_controller = ( SCIC_SDS_CONTROLLER_T * ) controller ; the_request = ( SCIC_SDS_REQUEST_T * ) io_request ; the_device = ( SCIC_SDS_REMOTE_DEVICE_T * ) remote_device ; status = scic_sds_remote_device_complete_io ( this_controller , the_device , the_request ) ; if ( status == SCI_SUCCESS ) { index = scic_sds_io_tag_get_index ( the_request -> io_tag ) ; this_controller -> io_request_table [ index ] = SCI_INVALID_HANDLE ; } return status ; }
This method is called when the SCIC_SDS_CONTROLLER is in the ready state
 and the complete io handler is called.
This method is called when the SCIC_SDS_CONTROLLER is in the ready state and the complete io handler is called .