FreeBSD/sys/dev/isci/scil/scic_sds_remote_device.c
/**
 * This method will destruct a SCIC_SDS_REMOTE_DEVICE that is in a stopped
 * state.  This is the only state from which a destruct request will succeed.
 * The RNi for this SCIC_SDS_REMOTE_DEVICE is returned to the free pool and
 * the device object transitions to the SCI_BASE_REMOTE_DEVICE_STATE_FINAL.
 *
 * @param[in] this_device The SCI_BASE_REMOTE_DEVICE which is cast into a
 *       SCIC_SDS_REMOTE_DEVICE.
 *
 * @return SCI_STATUS
 * @retval SCI_SUCCESS
 */
This method will destruct a SCIC_SDS_REMOTE_DEVICE that is in a stopped
state.  This is the only state from which a destruct request will succeed.
The RNi for this SCIC_SDS_REMOTE_DEVICE is returned to the free pool and
the device object transitions to the SCI_BASE_REMOTE_DEVICE_STATE_FINAL.

@param[in] this_device The SCI_BASE_REMOTE_DEVICE which is cast into a
SCIC_SDS_REMOTE_DEVICE.


This method will destruct a SCIC_SDS_REMOTE_DEVICE that is in a stopped state . This is the only state from which a destruct request will succeed . The RNi for this SCIC_SDS_REMOTE_DEVICE is returned to the free pool and the device object transitions to the SCI_BASE_REMOTE_DEVICE_STATE_FINAL . @param [ in ] this_device The SCI_BASE_REMOTE_DEVICE which is cast into a SCIC_SDS_REMOTE_DEVICE .
static
SCI_STATUS scic_sds_remote_device_stopped_state_destruct_handler(
   SCI_BASE_REMOTE_DEVICE_T *device
)
{
   SCIC_SDS_REMOTE_DEVICE_T *this_device = (SCIC_SDS_REMOTE_DEVICE_T *)device;
   SCIC_SDS_CONTROLLER_T * the_controller =
      scic_sds_remote_device_get_controller(this_device);
   the_controller->remote_device_sequence[this_device->rnc->remote_node_index]++;
   scic_sds_controller_free_remote_node_context(
      the_controller,
      this_device,
      this_device->rnc->remote_node_index
   );
   scic_sds_remote_node_context_set_remote_node_index(
      this_device->rnc,
      SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX
   );
   sci_base_state_machine_change_state(
      scic_sds_remote_device_get_base_state_machine(this_device),
      SCI_BASE_REMOTE_DEVICE_STATE_FINAL
   );
   scic_sds_remote_device_deinitialize_state_logging(this_device);
   return SCI_SUCCESS;
}
static SCI_STATUS scic_sds_remote_device_stopped_state_destruct_handler ( SCI_BASE_REMOTE_DEVICE_T * device ) { SCIC_SDS_REMOTE_DEVICE_T * this_device = ( SCIC_SDS_REMOTE_DEVICE_T * ) device ; SCIC_SDS_CONTROLLER_T * the_controller = scic_sds_remote_device_get_controller ( this_device ) ; the_controller -> remote_device_sequence [ this_device -> rnc -> remote_node_index ] ++ ; scic_sds_controller_free_remote_node_context ( the_controller , this_device , this_device -> rnc -> remote_node_index ) ; scic_sds_remote_node_context_set_remote_node_index ( this_device -> rnc , SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX ) ; sci_base_state_machine_change_state ( scic_sds_remote_device_get_base_state_machine ( this_device ) , SCI_BASE_REMOTE_DEVICE_STATE_FINAL ) ; scic_sds_remote_device_deinitialize_state_logging ( this_device ) ; return SCI_SUCCESS ; }
This method will destruct a SCIC_SDS_REMOTE_DEVICE that is in a stopped
 state.
This method will destruct a SCIC_SDS_REMOTE_DEVICE that is in a stopped state .