Commit f34d9e5d authored by Dan Williams's avatar Dan Williams

isci: unify rnc start{io|task} handlers

Unify rnc start{io|task} handlers and delete the state handler
infrastructure.
Reported-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent ed3efb77
This diff is collapsed.
...@@ -84,31 +84,6 @@ struct scic_sds_remote_node_context; ...@@ -84,31 +84,6 @@ 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)(
struct scic_sds_remote_node_context *sci_rnc,
scics_sds_remote_node_context_callback callback,
void *callback_parameter
);
typedef enum sci_status (*scic_sds_remote_node_context_io_request)(
struct scic_sds_remote_node_context *sci_rnc,
struct scic_sds_request *sci_req
);
struct scic_sds_remote_node_context_handlers {
/**
* 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;
/**
* 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;
};
/** /**
* This is the enumeration of the remote node context states. * This is the enumeration of the remote node context states.
*/ */
...@@ -220,8 +195,6 @@ struct scic_sds_remote_node_context { ...@@ -220,8 +195,6 @@ struct scic_sds_remote_node_context {
* This field contains the data for the object's state machine. * This field contains the data for the object's state machine.
*/ */
struct sci_base_state_machine state_machine; struct sci_base_state_machine state_machine;
struct scic_sds_remote_node_context_handlers *state_handlers;
}; };
void scic_sds_remote_node_context_construct(struct scic_sds_remote_node_context *rnc, void scic_sds_remote_node_context_construct(struct scic_sds_remote_node_context *rnc,
...@@ -236,24 +209,19 @@ bool scic_sds_remote_node_context_is_ready( ...@@ -236,24 +209,19 @@ bool scic_sds_remote_node_context_is_ready(
enum sci_status scic_sds_remote_node_context_event_handler(struct scic_sds_remote_node_context *sci_rnc, enum sci_status scic_sds_remote_node_context_event_handler(struct scic_sds_remote_node_context *sci_rnc,
u32 event_code); u32 event_code);
enum sci_status scic_sds_remote_node_context_destruct(struct scic_sds_remote_node_context *sci_rnc, enum sci_status scic_sds_remote_node_context_destruct(struct scic_sds_remote_node_context *sci_rnc,
scics_sds_remote_node_context_callback callback, scics_sds_remote_node_context_callback callback,
void *callback_parameter); void *callback_parameter);
enum sci_status scic_sds_remote_node_context_suspend(struct scic_sds_remote_node_context *sci_rnc, enum sci_status scic_sds_remote_node_context_suspend(struct scic_sds_remote_node_context *sci_rnc,
u32 suspend_type, u32 suspend_type,
scics_sds_remote_node_context_callback cb_fn, scics_sds_remote_node_context_callback cb_fn,
void *cb_p); void *cb_p);
enum sci_status scic_sds_remote_node_context_resume(struct scic_sds_remote_node_context *sci_rnc, enum sci_status scic_sds_remote_node_context_resume(struct scic_sds_remote_node_context *sci_rnc,
scics_sds_remote_node_context_callback cb_fn, scics_sds_remote_node_context_callback cb_fn,
void *cb_p); void *cb_p);
enum sci_status scic_sds_remote_node_context_start_task(struct scic_sds_remote_node_context *sci_rnc,
#define scic_sds_remote_node_context_start_io(rnc, request) \ struct scic_sds_request *sci_req);
((rnc)->state_handlers->start_io_handler(rnc, request)) enum sci_status scic_sds_remote_node_context_start_io(struct scic_sds_remote_node_context *sci_rnc,
struct scic_sds_request *sci_req);
#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_ */ #endif /* _SCIC_SDS_REMOTE_NODE_CONTEXT_H_ */
...@@ -83,14 +83,6 @@ struct sci_base_state { ...@@ -83,14 +83,6 @@ struct sci_base_state {
}; };
/**
* SET_STATE_HANDLER() -
*
* This macro simply provides simplified retrieval of an objects state handler.
*/
#define SET_STATE_HANDLER(object, table, state) \
(object)->state_handlers = &(table)[(state)]
/** /**
* struct sci_base_state_machine - This structure defines the fields common to * struct sci_base_state_machine - This structure defines the fields common to
* all state machines. * all state machines.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment