FreeBSD/sys/dev/isci/scil/scif_sas_remote_device_state_handlers.c
/**
 * @brief This method provides STOPPING state specific handling for
 *        when the core remote device object issues a stop completion
 *        notification.
 *
 * @note There is no need to ensure all IO/Task requests are complete
 *       before transitioning to the STOPPED state.  The SCI Core will
 *       ensure this is accomplished.
 *
 * @param[in]  remote_device This parameter specifies the remote device
 *             object for which the completion occurred.
 * @param[in]  completion_status This parameter specifies the status
 *             of the completion operation.
 *
 * @return none.
 */
@brief This method provides STOPPING state specific handling for
when the core remote device object issues a stop completion
notification.

@note There is no need to ensure all IO/Task requests are complete
before transitioning to the STOPPED state.  The SCI Core will
ensure this is accomplished.

@param[in]  remote_device This parameter specifies the remote device
object for which the completion occurred.
@param[in]  completion_status This parameter specifies the status
of the completion operation.

@return none.
@brief This method provides STOPPING state specific handling for when the core remote device object issues a stop completion notification . @note There is no need to ensure all IO / Task requests are complete before transitioning to the STOPPED state . The SCI Core will ensure this is accomplished . @param [ in ] remote_device This parameter specifies the remote device object for which the completion occurred . @param [ in ] completion_status This parameter specifies the status of the completion operation . @return none .
static
void scif_sas_remote_device_stopping_stop_complete_handler(
   SCIF_SAS_REMOTE_DEVICE_T * fw_device,
   SCI_STATUS                 completion_status
)
{
   sci_base_state_machine_change_state(
      &fw_device->parent.state_machine,
      SCI_BASE_REMOTE_DEVICE_STATE_STOPPED
   );
   if (completion_status != SCI_SUCCESS)
   {
      SCIF_LOG_ERROR((
         sci_base_object_get_logger(fw_device),
         SCIF_LOG_OBJECT_REMOTE_DEVICE | SCIF_LOG_OBJECT_REMOTE_DEVICE_CONFIG,
         "Device:0x%x Status:0x%x failed to stop core device\n",
         fw_device, completion_status
      ));
      scif_cb_controller_error(fw_device->domain->controller,
              SCI_CONTROLLER_REMOTE_DEVICE_ERROR);
   }
}
static void scif_sas_remote_device_stopping_stop_complete_handler ( SCIF_SAS_REMOTE_DEVICE_T * fw_device , SCI_STATUS completion_status ) { sci_base_state_machine_change_state ( & fw_device -> parent . state_machine , SCI_BASE_REMOTE_DEVICE_STATE_STOPPED ) ; if ( completion_status != SCI_SUCCESS ) { SCIF_LOG_ERROR ( ( sci_base_object_get_logger ( fw_device ) , SCIF_LOG_OBJECT_REMOTE_DEVICE | SCIF_LOG_OBJECT_REMOTE_DEVICE_CONFIG , " \n " , fw_device , completion_status ) ) ; scif_cb_controller_error ( fw_device -> domain -> controller , SCI_CONTROLLER_REMOTE_DEVICE_ERROR ) ; } }
@brief This method provides STOPPING state specific handling for
        when the core remote device object issues a stop completion
        notification.
@brief This method provides STOPPING state specific handling for when the core remote device object issues a stop completion notification .
// Transition directly to the STOPPED state since the core ensures // all IO/Tasks are complete. // Something is seriously wrong.  Stopping the core remote device // shouldn't fail in anyway.