/* --------------------------------------------------------------------------- */
-struct scic_sds_remote_device_state_handler
-scic_sds_remote_device_state_handler_table[SCI_BASE_REMOTE_DEVICE_MAX_STATES] =
-{
- /* SCI_BASE_REMOTE_DEVICE_STATE_INITIAL */
- {
- {
- scic_sds_remote_device_default_start_handler,
- scic_sds_remote_device_default_stop_handler,
- scic_sds_remote_device_default_fail_handler,
- scic_sds_remote_device_default_destruct_handler,
- scic_sds_remote_device_default_reset_handler,
- scic_sds_remote_device_default_reset_complete_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_default_complete_request_handler,
- scic_sds_remote_device_default_continue_request_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_default_complete_request_handler
- },
- scic_sds_remote_device_default_suspend_handler,
- scic_sds_remote_device_default_resume_handler,
- scic_sds_remote_device_default_event_handler,
- scic_sds_remote_device_default_frame_handler
+const struct scic_sds_remote_device_state_handler scic_sds_remote_device_state_handler_table[] = {
+ [SCI_BASE_REMOTE_DEVICE_STATE_INITIAL] = {
+ .parent.start_handler = scic_sds_remote_device_default_start_handler,
+ .parent.stop_handler = scic_sds_remote_device_default_stop_handler,
+ .parent.fail_handler = scic_sds_remote_device_default_fail_handler,
+ .parent.destruct_handler = scic_sds_remote_device_default_destruct_handler,
+ .parent.reset_handler = scic_sds_remote_device_default_reset_handler,
+ .parent.reset_complete_handler = scic_sds_remote_device_default_reset_complete_handler,
+ .parent.start_io_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_io_handler = scic_sds_remote_device_default_complete_request_handler,
+ .parent.continue_io_handler = scic_sds_remote_device_default_continue_request_handler,
+ .parent.start_task_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
+ .suspend_handler = scic_sds_remote_device_default_suspend_handler,
+ .resume_handler = scic_sds_remote_device_default_resume_handler,
+ .event_handler = scic_sds_remote_device_default_event_handler,
+ .frame_handler = scic_sds_remote_device_default_frame_handler
},
- /* SCI_BASE_REMOTE_DEVICE_STATE_STOPPED */
- {
- {
- scic_sds_remote_device_stopped_state_start_handler,
- scic_sds_remote_device_stopped_state_stop_handler,
- scic_sds_remote_device_default_fail_handler,
- scic_sds_remote_device_stopped_state_destruct_handler,
- scic_sds_remote_device_default_reset_handler,
- scic_sds_remote_device_default_reset_complete_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_default_complete_request_handler,
- scic_sds_remote_device_default_continue_request_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_default_complete_request_handler
- },
- scic_sds_remote_device_default_suspend_handler,
- scic_sds_remote_device_default_resume_handler,
- scic_sds_remote_device_default_event_handler,
- scic_sds_remote_device_default_frame_handler
+ [SCI_BASE_REMOTE_DEVICE_STATE_STOPPED] = {
+ .parent.start_handler = scic_sds_remote_device_stopped_state_start_handler,
+ .parent.stop_handler = scic_sds_remote_device_stopped_state_stop_handler,
+ .parent.fail_handler = scic_sds_remote_device_default_fail_handler,
+ .parent.destruct_handler = scic_sds_remote_device_stopped_state_destruct_handler,
+ .parent.reset_handler = scic_sds_remote_device_default_reset_handler,
+ .parent.reset_complete_handler = scic_sds_remote_device_default_reset_complete_handler,
+ .parent.start_io_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_io_handler = scic_sds_remote_device_default_complete_request_handler,
+ .parent.continue_io_handler = scic_sds_remote_device_default_continue_request_handler,
+ .parent.start_task_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
+ .suspend_handler = scic_sds_remote_device_default_suspend_handler,
+ .resume_handler = scic_sds_remote_device_default_resume_handler,
+ .event_handler = scic_sds_remote_device_default_event_handler,
+ .frame_handler = scic_sds_remote_device_default_frame_handler
},
- /* SCI_BASE_REMOTE_DEVICE_STATE_STARTING */
- {
- {
- scic_sds_remote_device_default_start_handler,
- scic_sds_remote_device_starting_state_stop_handler,
- scic_sds_remote_device_default_fail_handler,
- scic_sds_remote_device_default_destruct_handler,
- scic_sds_remote_device_default_reset_handler,
- scic_sds_remote_device_default_reset_complete_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_default_complete_request_handler,
- scic_sds_remote_device_default_continue_request_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_default_complete_request_handler
- },
- scic_sds_remote_device_default_suspend_handler,
- scic_sds_remote_device_default_resume_handler,
- scic_sds_remote_device_general_event_handler,
- scic_sds_remote_device_default_frame_handler
+ [SCI_BASE_REMOTE_DEVICE_STATE_STARTING] = {
+ .parent.start_handler = scic_sds_remote_device_default_start_handler,
+ .parent.stop_handler = scic_sds_remote_device_starting_state_stop_handler,
+ .parent.fail_handler = scic_sds_remote_device_default_fail_handler,
+ .parent.destruct_handler = scic_sds_remote_device_default_destruct_handler,
+ .parent.reset_handler = scic_sds_remote_device_default_reset_handler,
+ .parent.reset_complete_handler = scic_sds_remote_device_default_reset_complete_handler,
+ .parent.start_io_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_io_handler = scic_sds_remote_device_default_complete_request_handler,
+ .parent.continue_io_handler = scic_sds_remote_device_default_continue_request_handler,
+ .parent.start_task_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
+ .suspend_handler = scic_sds_remote_device_default_suspend_handler,
+ .resume_handler = scic_sds_remote_device_default_resume_handler,
+ .event_handler = scic_sds_remote_device_general_event_handler,
+ .frame_handler = scic_sds_remote_device_default_frame_handler
},
- /* SCI_BASE_REMOTE_DEVICE_STATE_READY */
- {
- {
- scic_sds_remote_device_default_start_handler,
- scic_sds_remote_device_ready_state_stop_handler,
- scic_sds_remote_device_default_fail_handler,
- scic_sds_remote_device_default_destruct_handler,
- scic_sds_remote_device_ready_state_reset_handler,
- scic_sds_remote_device_default_reset_complete_handler,
- scic_sds_remote_device_ready_state_start_io_handler,
- scic_sds_remote_device_ready_state_complete_request_handler,
- scic_sds_remote_device_default_continue_request_handler,
- scic_sds_remote_device_ready_state_start_task_handler,
- scic_sds_remote_device_ready_state_complete_request_handler
- },
- scic_sds_remote_device_default_suspend_handler,
- scic_sds_remote_device_default_resume_handler,
- scic_sds_remote_device_general_event_handler,
- scic_sds_remote_device_general_frame_handler,
+ [SCI_BASE_REMOTE_DEVICE_STATE_READY] = {
+ .parent.start_handler = scic_sds_remote_device_default_start_handler,
+ .parent.stop_handler = scic_sds_remote_device_ready_state_stop_handler,
+ .parent.fail_handler = scic_sds_remote_device_default_fail_handler,
+ .parent.destruct_handler = scic_sds_remote_device_default_destruct_handler,
+ .parent.reset_handler = scic_sds_remote_device_ready_state_reset_handler,
+ .parent.reset_complete_handler = scic_sds_remote_device_default_reset_complete_handler,
+ .parent.start_io_handler = scic_sds_remote_device_ready_state_start_io_handler,
+ .parent.complete_io_handler = scic_sds_remote_device_ready_state_complete_request_handler,
+ .parent.continue_io_handler = scic_sds_remote_device_default_continue_request_handler,
+ .parent.start_task_handler = scic_sds_remote_device_ready_state_start_task_handler,
+ .parent.complete_task_handler = scic_sds_remote_device_ready_state_complete_request_handler,
+ .suspend_handler = scic_sds_remote_device_default_suspend_handler,
+ .resume_handler = scic_sds_remote_device_default_resume_handler,
+ .event_handler = scic_sds_remote_device_general_event_handler,
+ .frame_handler = scic_sds_remote_device_general_frame_handler,
},
- /* SCI_BASE_REMOTE_DEVICE_STATE_STOPPING */
- {
- {
- scic_sds_remote_device_default_start_handler,
- scic_sds_remote_device_stopping_state_stop_handler,
- scic_sds_remote_device_default_fail_handler,
- scic_sds_remote_device_default_destruct_handler,
- scic_sds_remote_device_default_reset_handler,
- scic_sds_remote_device_default_reset_complete_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_stopping_state_complete_request_handler,
- scic_sds_remote_device_default_continue_request_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_stopping_state_complete_request_handler
- },
- scic_sds_remote_device_default_suspend_handler,
- scic_sds_remote_device_default_resume_handler,
- scic_sds_remote_device_general_event_handler,
- scic_sds_remote_device_general_frame_handler
+ [SCI_BASE_REMOTE_DEVICE_STATE_STOPPING] = {
+ .parent.start_handler = scic_sds_remote_device_default_start_handler,
+ .parent.stop_handler = scic_sds_remote_device_stopping_state_stop_handler,
+ .parent.fail_handler = scic_sds_remote_device_default_fail_handler,
+ .parent.destruct_handler = scic_sds_remote_device_default_destruct_handler,
+ .parent.reset_handler = scic_sds_remote_device_default_reset_handler,
+ .parent.reset_complete_handler = scic_sds_remote_device_default_reset_complete_handler,
+ .parent.start_io_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_io_handler = scic_sds_remote_device_stopping_state_complete_request_handler,
+ .parent.continue_io_handler = scic_sds_remote_device_default_continue_request_handler,
+ .parent.start_task_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_task_handler = scic_sds_remote_device_stopping_state_complete_request_handler,
+ .suspend_handler = scic_sds_remote_device_default_suspend_handler,
+ .resume_handler = scic_sds_remote_device_default_resume_handler,
+ .event_handler = scic_sds_remote_device_general_event_handler,
+ .frame_handler = scic_sds_remote_device_general_frame_handler
},
- /* SCI_BASE_REMOTE_DEVICE_STATE_FAILED */
- {
- {
- scic_sds_remote_device_default_start_handler,
- scic_sds_remote_device_default_stop_handler,
- scic_sds_remote_device_default_fail_handler,
- scic_sds_remote_device_default_destruct_handler,
- scic_sds_remote_device_default_reset_handler,
- scic_sds_remote_device_default_reset_complete_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_default_complete_request_handler,
- scic_sds_remote_device_default_continue_request_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_default_complete_request_handler
- },
- scic_sds_remote_device_default_suspend_handler,
- scic_sds_remote_device_default_resume_handler,
- scic_sds_remote_device_default_event_handler,
- scic_sds_remote_device_general_frame_handler
+ [SCI_BASE_REMOTE_DEVICE_STATE_FAILED] = {
+ .parent.start_handler = scic_sds_remote_device_default_start_handler,
+ .parent.stop_handler = scic_sds_remote_device_default_stop_handler,
+ .parent.fail_handler = scic_sds_remote_device_default_fail_handler,
+ .parent.destruct_handler = scic_sds_remote_device_default_destruct_handler,
+ .parent.reset_handler = scic_sds_remote_device_default_reset_handler,
+ .parent.reset_complete_handler = scic_sds_remote_device_default_reset_complete_handler,
+ .parent.start_io_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_io_handler = scic_sds_remote_device_default_complete_request_handler,
+ .parent.continue_io_handler = scic_sds_remote_device_default_continue_request_handler,
+ .parent.start_task_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
+ .suspend_handler = scic_sds_remote_device_default_suspend_handler,
+ .resume_handler = scic_sds_remote_device_default_resume_handler,
+ .event_handler = scic_sds_remote_device_default_event_handler,
+ .frame_handler = scic_sds_remote_device_general_frame_handler
},
- /* SCI_BASE_REMOTE_DEVICE_STATE_RESETTING */
- {
- {
- scic_sds_remote_device_default_start_handler,
- scic_sds_remote_device_resetting_state_stop_handler,
- scic_sds_remote_device_default_fail_handler,
- scic_sds_remote_device_default_destruct_handler,
- scic_sds_remote_device_default_reset_handler,
- scic_sds_remote_device_resetting_state_reset_complete_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_resetting_state_complete_request_handler,
- scic_sds_remote_device_default_continue_request_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_resetting_state_complete_request_handler
- },
- scic_sds_remote_device_default_suspend_handler,
- scic_sds_remote_device_default_resume_handler,
- scic_sds_remote_device_default_event_handler,
- scic_sds_remote_device_general_frame_handler
+ [SCI_BASE_REMOTE_DEVICE_STATE_RESETTING] = {
+ .parent.start_handler = scic_sds_remote_device_default_start_handler,
+ .parent.stop_handler = scic_sds_remote_device_resetting_state_stop_handler,
+ .parent.fail_handler = scic_sds_remote_device_default_fail_handler,
+ .parent.destruct_handler = scic_sds_remote_device_default_destruct_handler,
+ .parent.reset_handler = scic_sds_remote_device_default_reset_handler,
+ .parent.reset_complete_handler = scic_sds_remote_device_resetting_state_reset_complete_handler,
+ .parent.start_io_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_io_handler = scic_sds_remote_device_resetting_state_complete_request_handler,
+ .parent.continue_io_handler = scic_sds_remote_device_default_continue_request_handler,
+ .parent.start_task_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_task_handler = scic_sds_remote_device_resetting_state_complete_request_handler,
+ .suspend_handler = scic_sds_remote_device_default_suspend_handler,
+ .resume_handler = scic_sds_remote_device_default_resume_handler,
+ .event_handler = scic_sds_remote_device_default_event_handler,
+ .frame_handler = scic_sds_remote_device_general_frame_handler
},
- /* SCI_BASE_REMOTE_DEVICE_STATE_FINAL */
- {
- {
- scic_sds_remote_device_default_start_handler,
- scic_sds_remote_device_default_stop_handler,
- scic_sds_remote_device_default_fail_handler,
- scic_sds_remote_device_default_destruct_handler,
- scic_sds_remote_device_default_reset_handler,
- scic_sds_remote_device_default_reset_complete_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_default_complete_request_handler,
- scic_sds_remote_device_default_continue_request_handler,
- scic_sds_remote_device_default_start_request_handler,
- scic_sds_remote_device_default_complete_request_handler
- },
- scic_sds_remote_device_default_suspend_handler,
- scic_sds_remote_device_default_resume_handler,
- scic_sds_remote_device_default_event_handler,
- scic_sds_remote_device_default_frame_handler
+ [SCI_BASE_REMOTE_DEVICE_STATE_FINAL] = {
+ .parent.start_handler = scic_sds_remote_device_default_start_handler,
+ .parent.stop_handler = scic_sds_remote_device_default_stop_handler,
+ .parent.fail_handler = scic_sds_remote_device_default_fail_handler,
+ .parent.destruct_handler = scic_sds_remote_device_default_destruct_handler,
+ .parent.reset_handler = scic_sds_remote_device_default_reset_handler,
+ .parent.reset_complete_handler = scic_sds_remote_device_default_reset_complete_handler,
+ .parent.start_io_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_io_handler = scic_sds_remote_device_default_complete_request_handler,
+ .parent.continue_io_handler = scic_sds_remote_device_default_continue_request_handler,
+ .parent.start_task_handler = scic_sds_remote_device_default_start_request_handler,
+ .parent.complete_task_handler = scic_sds_remote_device_default_complete_request_handler,
+ .suspend_handler = scic_sds_remote_device_default_suspend_handler,
+ .resume_handler = scic_sds_remote_device_default_resume_handler,
+ .event_handler = scic_sds_remote_device_default_event_handler,
+ .frame_handler = scic_sds_remote_device_default_frame_handler
}
};
SCIC_SDS_SSP_REMOTE_DEVICE_READY_SUBSTATE_INITIAL,
/**
- * This is the ready operational substate for the remote device. This is the
- * normal operational state for a remote device.
+ * This is the ready operational substate for the remote device.
+ * This is the normal operational state for a remote device.
*/
SCIC_SDS_SSP_REMOTE_DEVICE_READY_SUBSTATE_OPERATIONAL,
/**
- * This is the suspended state for the remote device. This is the state that
- * the device is placed in when a RNC suspend is received by the SCU hardware.
+ * This is the suspended state for the remote device. This is the state
+ * that the device is placed in when a RNC suspend is received by
+ * the SCU hardware.
*/
SCIC_SDS_SSP_REMOTE_DEVICE_READY_SUBSTATE_SUSPENDED,
/**
- * This is the final state that the device is placed in before a change to the
- * base state machine.
+ * This is the final state that the device is placed in before a change
+ * to the base state machine.
*/
SCIC_SDS_SSP_REMOTE_DEVICE_READY_SUBSTATE_FINAL,
/**
* enum SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATES -
*
- * This is the enumeration for the struct scic_sds_remote_device ready substates for
- * the STP remote device.
+ * This is the enumeration for the struct scic_sds_remote_device ready substates
+ * for the STP remote device.
*/
enum SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATES {
/**
SCIC_SDS_STP_REMOTE_DEVICE_READY_MAX_SUBSTATES
};
-
/**
* enum SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATES -
*
* This is the enumeration of the ready substates for the SMP REMOTE DEVICE.
*/
-
enum SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATES {
/**
* This is the ready operational substate for the remote device. This is the
SCIC_SDS_SMP_REMOTE_DEVICE_READY_MAX_SUBSTATES
};
-
-
-
/**
* struct scic_sds_remote_device - This structure contains the data for an SCU
* implementation of the SCU Core device data.
struct sci_sas_address device_address;
/**
- * This filed is assinged the value of true if the device is directly attached
- * to the port.
+ * This filed is assinged the value of true if the device is directly
+ * attached to the port.
*/
bool is_direct_attached;
#if !defined(DISABLE_ATAPI)
/**
- * This filed is assinged the value of true if the device is an ATAPI device.
+ * This filed is assinged the value of true if the device is an ATAPI
+ * device.
*/
bool is_atapi;
#endif
/**
- * This filed contains a pointer back to the port to which this device is
- * assigned.
+ * This filed contains a pointer back to the port to which this device
+ * is assigned.
*/
struct scic_sds_port *owning_port;
* This field maintains the set of state handlers for the remote device
* object. These are changed each time the remote device enters a new state.
*/
- struct scic_sds_remote_device_state_handler *state_handlers;
+ const struct scic_sds_remote_device_state_handler *state_handlers;
};
-
-typedef enum sci_status (*SCIC_SDS_REMOTE_DEVICE_HANDLER_T)(
+typedef enum sci_status (*scic_sds_remote_device_handler_t)(
struct scic_sds_remote_device *this_device);
-typedef enum sci_status (*SCIC_SDS_REMOTE_DEVICE_SUSPEND_HANDLER_T)(
+typedef enum sci_status (*scic_sds_remote_device_suspend_handler_t)(
struct scic_sds_remote_device *this_device,
u32 suspend_type);
-typedef enum sci_status (*SCIC_SDS_REMOTE_DEVICE_RESUME_HANDLER_T)(
+typedef enum sci_status (*scic_sds_remote_device_resume_handler_t)(
struct scic_sds_remote_device *this_device);
-typedef enum sci_status (*SCIC_SDS_REMOTE_DEVICE_FRAME_HANDLER_T)(
+typedef enum sci_status (*scic_sds_remote_device_frame_handler_t)(
struct scic_sds_remote_device *this_device,
u32 frame_index);
-typedef enum sci_status (*SCIC_SDS_REMOTE_DEVICE_EVENT_HANDLER_T)(
+typedef enum sci_status (*scic_sds_remote_device_event_handler_t)(
struct scic_sds_remote_device *this_device,
u32 event_code);
-typedef void (*SCIC_SDS_REMOTE_DEVICE_READY_NOT_READY_HANDLER_T)(
+typedef void (*scic_sds_remote_device_ready_not_ready_handler_t)(
struct scic_sds_remote_device *this_device);
/**
*/
struct scic_sds_remote_device_state_handler {
struct sci_base_remote_device_state_handler parent;
-
- SCIC_SDS_REMOTE_DEVICE_SUSPEND_HANDLER_T suspend_handler;
- SCIC_SDS_REMOTE_DEVICE_RESUME_HANDLER_T resume_handler;
-
- SCIC_SDS_REMOTE_DEVICE_EVENT_HANDLER_T event_handler;
- SCIC_SDS_REMOTE_DEVICE_FRAME_HANDLER_T frame_handler;
-
+ scic_sds_remote_device_suspend_handler_t suspend_handler;
+ scic_sds_remote_device_resume_handler_t resume_handler;
+ scic_sds_remote_device_event_handler_t event_handler;
+ scic_sds_remote_device_frame_handler_t frame_handler;
};
-
extern const struct sci_base_state scic_sds_remote_device_state_table[];
extern const struct sci_base_state scic_sds_ssp_remote_device_ready_substate_table[];
extern const struct sci_base_state scic_sds_stp_remote_device_ready_substate_table[];
extern const struct sci_base_state scic_sds_smp_remote_device_ready_substate_table[];
-extern struct scic_sds_remote_device_state_handler
- scic_sds_remote_device_state_handler_table[];
+extern const struct scic_sds_remote_device_state_handler scic_sds_remote_device_state_handler_table[];
extern struct scic_sds_remote_device_state_handler
scic_sds_ssp_remote_device_ready_substate_handler_table[];
extern struct scic_sds_remote_device_state_handler
#define scic_sds_remote_device_set_working_request(device, request) \
((device)->working_request = (request))
-/* --------------------------------------------------------------------------- */
-
-
-
enum sci_status scic_sds_remote_device_frame_handler(
struct scic_sds_remote_device *this_device,
u32 frame_index);
#define scic_sds_remote_device_is_atapi(this_device) false
#endif /* !defined(DISABLE_ATAPI) */
-/* --------------------------------------------------------------------------- */
-
-/* --------------------------------------------------------------------------- */
-
void scic_sds_remote_device_start_request(
struct scic_sds_remote_device *this_device,
struct scic_sds_request *the_request,
enum sci_status scic_sds_remote_device_default_start_handler(
struct sci_base_remote_device *this_device);
-
enum sci_status scic_sds_remote_device_default_fail_handler(
struct sci_base_remote_device *this_device);
struct scic_sds_remote_device *this_device,
u32 frame_index);
-/* --------------------------------------------------------------------------- */
-
enum sci_status scic_sds_remote_device_ready_state_stop_handler(
struct sci_base_remote_device *device);
enum sci_status scic_sds_ssp_remote_device_ready_suspended_substate_resume_handler(
struct scic_sds_remote_device *this_device);
-/* --------------------------------------------------------------------------- */
-
-
#endif /* _SCIC_SDS_REMOTE_DEVICE_H_ */
*/
static void scic_sds_remote_node_context_setup_to_resume(
struct scic_sds_remote_node_context *this_rnc,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
if (this_rnc->destination_state != SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_FINAL) {
*/
static void scic_sds_remote_node_context_setup_to_destory(
struct scic_sds_remote_node_context *this_rnc,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
this_rnc->destination_state = SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_FINAL;
*/
static enum sci_status scic_sds_remote_node_context_continue_to_resume_handler(
struct scic_sds_remote_node_context *this_rnc,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
if (this_rnc->destination_state == SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_READY) {
static enum sci_status scic_sds_remote_node_context_default_destruct_handler(
struct scic_sds_remote_node_context *this_rnc,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
dev_warn(scirdev_to_dev(this_rnc->device),
static enum sci_status scic_sds_remote_node_context_default_suspend_handler(
struct scic_sds_remote_node_context *this_rnc,
u32 suspend_type,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
dev_warn(scirdev_to_dev(this_rnc->device),
static enum sci_status scic_sds_remote_node_context_default_resume_handler(
struct scic_sds_remote_node_context *this_rnc,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
dev_warn(scirdev_to_dev(this_rnc->device),
*/
static enum sci_status scic_sds_remote_node_context_general_destruct_handler(
struct scic_sds_remote_node_context *this_rnc,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
scic_sds_remote_node_context_setup_to_destory(
static enum sci_status scic_sds_remote_node_context_initial_state_resume_handler(
struct scic_sds_remote_node_context *this_rnc,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
if (this_rnc->remote_node_index != SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX) {
static enum sci_status scic_sds_remote_node_context_invalidating_state_destruct_handler(
struct scic_sds_remote_node_context *this_rnc,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
scic_sds_remote_node_context_setup_to_destory(
static enum sci_status scic_sds_remote_node_context_ready_state_suspend_handler(
struct scic_sds_remote_node_context *this_rnc,
u32 suspend_type,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
this_rnc->user_callback = the_callback;
static enum sci_status scic_sds_remote_node_context_tx_suspended_state_resume_handler(
struct scic_sds_remote_node_context *this_rnc,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
enum sci_status status;
static enum sci_status scic_sds_remote_node_context_tx_rx_suspended_state_resume_handler(
struct scic_sds_remote_node_context *this_rnc,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
scic_sds_remote_node_context_setup_to_resume(
*/
static enum sci_status scic_sds_remote_node_context_await_suspension_state_resume_handler(
struct scic_sds_remote_node_context *this_rnc,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter)
{
scic_sds_remote_node_context_setup_to_resume(
#include "sci_base_state.h"
#include "sci_base_state_machine.h"
-/* --------------------------------------------------------------------------- */
-
/**
*
*
struct scic_sds_remote_device;
struct scic_sds_remote_node_context;
-typedef void (*SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK)(void *);
+typedef void (*scics_sds_remote_node_context_callback)(void *);
-typedef enum sci_status (*SCIC_SDS_REMOTE_NODE_CONTEXT_OPERATION)(
+typedef enum sci_status (*scic_sds_remote_node_context_operation)(
struct scic_sds_remote_node_context *this_rnc,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter
);
-typedef enum sci_status (*SCIC_SDS_REMOTE_NODE_CONTEXT_SUSPEND_OPERATION)(
+typedef enum sci_status (*scic_sds_remote_node_context_suspend_operation)(
struct scic_sds_remote_node_context *this_rnc,
u32 suspension_type,
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK the_callback,
+ scics_sds_remote_node_context_callback the_callback,
void *callback_parameter
);
-typedef enum sci_status (*SCIC_SDS_REMOTE_NODE_CONTEXT_IO_REQUEST)(
+typedef enum sci_status (*scic_sds_remote_node_context_io_request)(
struct scic_sds_remote_node_context *this_rnc,
struct scic_sds_request *the_request
);
-typedef enum sci_status (*SCIC_SDS_REMOTE_NODE_CONTEXT_EVENT_HANDLER)(
+typedef enum sci_status (*scic_sds_remote_node_context_event_handler)(
struct scic_sds_remote_node_context *this_rnc,
u32 event_code
);
-/* --------------------------------------------------------------------------- */
-
struct scic_sds_remote_node_context_handlers {
/**
* This handle is invoked to stop the RNC. The callback is invoked when after
* the hardware notification that the RNC has been invalidated.
*/
- SCIC_SDS_REMOTE_NODE_CONTEXT_OPERATION destruct_handler;
+ scic_sds_remote_node_context_operation destruct_handler;
/**
* This handler is invoked when there is a request to suspend the RNC. The
* callback is invoked after the hardware notification that the remote node is
* suspended.
*/
- SCIC_SDS_REMOTE_NODE_CONTEXT_SUSPEND_OPERATION suspend_handler;
+ scic_sds_remote_node_context_suspend_operation suspend_handler;
/**
* This handler is invoked when there is a request to resume the RNC. The
* callback is invoked when after the RNC has reached the ready state.
*/
- SCIC_SDS_REMOTE_NODE_CONTEXT_OPERATION resume_handler;
+ scic_sds_remote_node_context_operation resume_handler;
/**
* This handler is invoked when there is a request to start an io request
* operation.
*/
- SCIC_SDS_REMOTE_NODE_CONTEXT_IO_REQUEST start_io_handler;
+ scic_sds_remote_node_context_io_request start_io_handler;
/**
* This handler is invoked when there is a request to start a task request
* operation.
*/
- SCIC_SDS_REMOTE_NODE_CONTEXT_IO_REQUEST start_task_handler;
+ scic_sds_remote_node_context_io_request start_task_handler;
/**
* This handler is invoked where there is an RNC event that must be processed.
*/
- SCIC_SDS_REMOTE_NODE_CONTEXT_EVENT_HANDLER event_handler;
+ scic_sds_remote_node_context_event_handler event_handler;
};
-/* --------------------------------------------------------------------------- */
-
/**
- *
- *
* This is the enumeration of the remote node context states.
*/
enum scis_sds_remote_node_context_states {
* associated with the remote node context object. The remote node context
* (RNC) object models the the remote device information necessary to manage
* the silicon RNC.
- *
- *
*/
struct scic_sds_remote_node_context {
/*
* This field contains the callback function that the user requested to be
* called when the requested state transition is complete.
*/
- SCICS_SDS_REMOTE_NODE_CONTEXT_CALLBACK user_callback;
+ scics_sds_remote_node_context_callback user_callback;
/**
* This field contains the parameter that is called when the user requested
struct scic_sds_remote_node_context_handlers *state_handlers;
};
-/* --------------------------------------------------------------------------- */
-
extern const struct sci_base_state scic_sds_remote_node_context_state_table[];
extern struct scic_sds_remote_node_context_handlers
scic_sds_remote_node_context_state_handler_table[
SCIC_SDS_REMOTE_NODE_CONTEXT_MAX_STATES];
-/* --------------------------------------------------------------------------- */
-
void scic_sds_remote_node_context_construct(
struct scic_sds_remote_device *device,
struct scic_sds_remote_node_context *rnc,
void scic_sds_remote_node_context_construct_buffer(
struct scic_sds_remote_node_context *rnc);
-
bool scic_sds_remote_node_context_is_ready(
struct scic_sds_remote_node_context *this_rnc);
#define scic_sds_remote_node_context_start_task(rnc, task) \
((rnc)->state_handlers->start_task_handler(rnc, task))
-/* --------------------------------------------------------------------------- */
-
#endif /* _SCIC_SDS_REMOTE_NODE_CONTEXT_H_ */
-