FreeBSD/sys/dev/isci/scil/scif_sas_remote_device_state_handlers.c
/**
 * @brief This method provides handling (i.e. returns an error);
 *        when a user attempts to stop a remote device during the updating
 *        port width state, it will record the destination state for this
 *        device to be STOPPING, instead of usually READY state.
 *
 * @param[in]  remote_device This parameter specifies the remote device object
 *             on which the user is attempting to perform a stop operation.
 *
 * @return This method always return SCI_SUCCESS.
 */
@brief This method provides handling ;
when a user attempts to stop a remote device during the updating
port width state, it will record the destination state for this
device to be STOPPING, instead of usually READY state.

@param[in]  remote_device This parameter specifies the remote device object
on which the user is attempting to perform a stop operation.

@return This method always return SCI_SUCCESS.
@brief This method provides handling ; when a user attempts to stop a remote device during the updating port width state it will record the destination state for this device to be STOPPING instead of usually READY state . @param [ in ] remote_device This parameter specifies the remote device object on which the user is attempting to perform a stop operation . @return This method always return SCI_SUCCESS .
static
SCI_STATUS scif_sas_remote_device_updating_port_width_state_stop_handler(
   SCI_BASE_REMOTE_DEVICE_T * remote_device
)
{
   SCIF_SAS_REMOTE_DEVICE_T * fw_device =
      (SCIF_SAS_REMOTE_DEVICE_T *)remote_device;
   SCIF_LOG_INFO((
      sci_base_object_get_logger(fw_device),
      SCIF_LOG_OBJECT_REMOTE_DEVICE,
      "RemoteDevice:0x%x updating port width state stop handler\n",
      fw_device,
      sci_base_state_machine_get_state(&fw_device->parent.state_machine)
   ));
   fw_device->destination_state =
      SCIF_SAS_REMOTE_DEVICE_DESTINATION_STATE_STOPPING;
   return SCI_SUCCESS;
}
static SCI_STATUS scif_sas_remote_device_updating_port_width_state_stop_handler ( SCI_BASE_REMOTE_DEVICE_T * remote_device ) { SCIF_SAS_REMOTE_DEVICE_T * fw_device = ( SCIF_SAS_REMOTE_DEVICE_T * ) remote_device ; SCIF_LOG_INFO ( ( sci_base_object_get_logger ( fw_device ) , SCIF_LOG_OBJECT_REMOTE_DEVICE , " \n " , fw_device , sci_base_state_machine_get_state ( & fw_device -> parent . state_machine ) ) ) ; fw_device -> destination_state = SCIF_SAS_REMOTE_DEVICE_DESTINATION_STATE_STOPPING ; return SCI_SUCCESS ; }
@brief This method provides handling (i.e.
@brief This method provides handling ( i . e .
//Can't stop the device right now. Remember the pending stopping request. //When exit the UPDATING_PORT_WIDTH state, we will check this variable //to decide which state to go.