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
SCI_STATUS scif_sas_remote_device_updating_port_width_state_complete_io_handler(
   SCI_BASE_REMOTE_DEVICE_T * remote_device,
   SCI_BASE_REQUEST_T       * io_request
)
{
   SCIF_SAS_REMOTE_DEVICE_T * fw_device = (SCIF_SAS_REMOTE_DEVICE_T*)
                                          remote_device;
   fw_device->request_count--;
   if (fw_device->request_count == 0 )
   {
      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
      {
         scic_remote_device_stop(
            fw_device->core_object, SCIF_SAS_REMOTE_DEVICE_CORE_OP_TIMEOUT);
      }
   }
   return SCI_SUCCESS;
}
static SCI_STATUS scif_sas_remote_device_updating_port_width_state_complete_io_handler ( SCI_BASE_REMOTE_DEVICE_T * remote_device , SCI_BASE_REQUEST_T * io_request ) { SCIF_SAS_REMOTE_DEVICE_T * fw_device = ( SCIF_SAS_REMOTE_DEVICE_T * ) remote_device ; fw_device -> request_count -- ; if ( fw_device -> request_count == 0 ) { 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 { scic_remote_device_stop ( fw_device -> core_object , SCIF_SAS_REMOTE_DEVICE_CORE_OP_TIMEOUT ) ; } } return SCI_SUCCESS ; }
@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 request count is zero, go ahead to update the RNC. //if the destination state of this device change to STOPPING, no matter //whether we need to update the port width, just make the device //go to the STOPPING state, the device will be removed anyway. //stop the device, upon the stop complete callback, start the device again //with the updated port width.