FreeBSD/sys/dev/isci/scil/scif_sas_remote_device_state_handlers.c
/**
 * @brief This method provides handling of device start complete duing
 *        UPDATING_PORT_WIDTH state.
 *
 * @param[in]  remote_device This parameter specifies the remote device object
 *             which is start complete.
 *
 * @return none.
 */
@brief This method provides handling of device start complete duing
UPDATING_PORT_WIDTH state.

@param[in]  remote_device This parameter specifies the remote device object
which is start complete.

@return none.
@brief This method provides handling of device start complete duing UPDATING_PORT_WIDTH state . @param [ in ] remote_device This parameter specifies the remote device object which is start complete . @return none .
static
void scif_sas_remote_device_updating_port_width_state_start_complete_handler(
   SCIF_SAS_REMOTE_DEVICE_T * fw_device,
   SCI_STATUS                 completion_status
)
{
   SCIF_LOG_INFO((
      sci_base_object_get_logger(fw_device),
      SCIF_LOG_OBJECT_REMOTE_DEVICE,
      "RemoteDevice:0x%x updating port width state start complete handler\n",
      fw_device,
      sci_base_state_machine_get_state(&fw_device->parent.state_machine)
   ));
   if ( fw_device->destination_state
           == SCIF_SAS_REMOTE_DEVICE_DESTINATION_STATE_STOPPING )
   {
      sci_base_state_machine_change_state(
         &fw_device->parent.state_machine,
         SCI_BASE_REMOTE_DEVICE_STATE_STOPPING
      );
   }
   else if ( scic_remote_device_get_port_width(fw_device->core_object)
                != fw_device->device_port_width
            && fw_device->device_port_width != 0)
   {
      scic_remote_device_stop(
         fw_device->core_object,
         SCIF_SAS_REMOTE_DEVICE_CORE_OP_TIMEOUT
      );
   }
   else
   {
      sci_base_state_machine_change_state(
         &fw_device->parent.state_machine,
         SCI_BASE_REMOTE_DEVICE_STATE_READY
      );
   }
}
static void scif_sas_remote_device_updating_port_width_state_start_complete_handler ( SCIF_SAS_REMOTE_DEVICE_T * fw_device , SCI_STATUS completion_status ) { 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 ) ) ) ; if ( fw_device -> destination_state == SCIF_SAS_REMOTE_DEVICE_DESTINATION_STATE_STOPPING ) { sci_base_state_machine_change_state ( & fw_device -> parent . state_machine , SCI_BASE_REMOTE_DEVICE_STATE_STOPPING ) ; } else if ( scic_remote_device_get_port_width ( fw_device -> core_object ) != fw_device -> device_port_width && fw_device -> device_port_width != 0 ) { scic_remote_device_stop ( fw_device -> core_object , SCIF_SAS_REMOTE_DEVICE_CORE_OP_TIMEOUT ) ; } else { sci_base_state_machine_change_state ( & fw_device -> parent . state_machine , SCI_BASE_REMOTE_DEVICE_STATE_READY ) ; } }
@brief This method provides handling of device start complete duing
        UPDATING_PORT_WIDTH state.
@brief This method provides handling of device start complete duing UPDATING_PORT_WIDTH state .
//if the destination state of this device change to STOPPING, no matter //whether we need to update the port width again, just make the device //go to the STOPPING state. //Port width updating succeeds. Transfer to destination state.