FreeBSD/sys/dev/isci/scil/scic_sds_remote_device.c
/**
 * This method completes requests for this SCIC_SDS_REMOTE_DEVICE while it is
 * in the SCI_BASE_REMOTE_DEVICE_STATE_STOPPING state. This method calls the
 * complete method for the request object and if that is successful the port
 * object is called to complete the task request. Then the device object
 * itself completes the task request. If SCIC_SDS_REMOTE_DEVICE
 * started_request_count goes to 0 and the invalidate RNC request has
 * completed the device object can transition to the
 * SCI_BASE_REMOTE_DEVICE_STATE_STOPPED.
 *
 * @param[in] device The device object for which the request is completing.
 * @param[in] request The task request that is being completed.
 *
 * @return SCI_STATUS
 */
This method completes requests for this SCIC_SDS_REMOTE_DEVICE while it is
in the SCI_BASE_REMOTE_DEVICE_STATE_STOPPING state. This method calls the
complete method for the request object and if that is successful the port
object is called to complete the task request. Then the device object
itself completes the task request. If SCIC_SDS_REMOTE_DEVICE
started_request_count goes to 0 and the invalidate RNC request has
completed the device object can transition to the
SCI_BASE_REMOTE_DEVICE_STATE_STOPPED.

@param[in] device The device object for which the request is completing.
@param[in] request The task request that is being completed.


This method completes requests for this SCIC_SDS_REMOTE_DEVICE while it is in the SCI_BASE_REMOTE_DEVICE_STATE_STOPPING state . This method calls the complete method for the request object and if that is successful the port object is called to complete the task request . Then the device object itself completes the task request . If SCIC_SDS_REMOTE_DEVICE started_request_count goes to 0 and the invalidate RNC request has completed the device object can transition to the SCI_BASE_REMOTE_DEVICE_STATE_STOPPED . @param [ in ] device The device object for which the request is completing . @param [ in ] request The task request that is being completed .
static
SCI_STATUS scic_sds_remote_device_stopping_state_complete_request_handler(
   SCI_BASE_REMOTE_DEVICE_T *device,
   SCI_BASE_REQUEST_T       *request
)
{
   SCI_STATUS                status = SCI_SUCCESS;
   SCIC_SDS_REQUEST_T       *this_request = (SCIC_SDS_REQUEST_T   *)request;
   SCIC_SDS_REMOTE_DEVICE_T *this_device = (SCIC_SDS_REMOTE_DEVICE_T *)device;
   status = scic_sds_request_complete(this_request);
   if (status == SCI_SUCCESS)
   {
      status = scic_sds_port_complete_io(
                  scic_sds_remote_device_get_port(this_device),
                  this_device,
                  this_request
               );
      if (status == SCI_SUCCESS)
      {
         scic_sds_remote_device_decrement_request_count(this_device);
         if (scic_sds_remote_device_get_request_count(this_device) == 0)
         {
            scic_sds_remote_node_context_destruct(
               this_device->rnc,
               scic_sds_cb_remote_device_rnc_destruct_complete,
               this_device
            );
         }
      }
   }
   return status;
}
static SCI_STATUS scic_sds_remote_device_stopping_state_complete_request_handler ( SCI_BASE_REMOTE_DEVICE_T * device , SCI_BASE_REQUEST_T * request ) { SCI_STATUS status = SCI_SUCCESS ; SCIC_SDS_REQUEST_T * this_request = ( SCIC_SDS_REQUEST_T * ) request ; SCIC_SDS_REMOTE_DEVICE_T * this_device = ( SCIC_SDS_REMOTE_DEVICE_T * ) device ; status = scic_sds_request_complete ( this_request ) ; if ( status == SCI_SUCCESS ) { status = scic_sds_port_complete_io ( scic_sds_remote_device_get_port ( this_device ) , this_device , this_request ) ; if ( status == SCI_SUCCESS ) { scic_sds_remote_device_decrement_request_count ( this_device ) ; if ( scic_sds_remote_device_get_request_count ( this_device ) == 0 ) { scic_sds_remote_node_context_destruct ( this_device -> rnc , scic_sds_cb_remote_device_rnc_destruct_complete , this_device ) ; } } } return status ; }
This method completes requests for this SCIC_SDS_REMOTE_DEVICE while it is
 in the SCI_BASE_REMOTE_DEVICE_STATE_STOPPING state.
This method completes requests for this SCIC_SDS_REMOTE_DEVICE while it is in the SCI_BASE_REMOTE_DEVICE_STATE_STOPPING state .