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;
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.
*/
......@@ -220,8 +195,6 @@ struct scic_sds_remote_node_context {
* This field contains the data for the object's 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,
......@@ -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,
u32 event_code);
enum sci_status scic_sds_remote_node_context_destruct(struct scic_sds_remote_node_context *sci_rnc,
scics_sds_remote_node_context_callback callback,
void *callback_parameter);
enum sci_status scic_sds_remote_node_context_suspend(struct scic_sds_remote_node_context *sci_rnc,
u32 suspend_type,
scics_sds_remote_node_context_callback cb_fn,
void *cb_p);
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,
void *cb_p);
#define scic_sds_remote_node_context_start_io(rnc, request) \
((rnc)->state_handlers->start_io_handler(rnc, request))
#define scic_sds_remote_node_context_start_task(rnc, task) \
((rnc)->state_handlers->start_task_handler(rnc, task))
enum sci_status scic_sds_remote_node_context_start_task(struct scic_sds_remote_node_context *sci_rnc,
struct scic_sds_request *sci_req);
enum sci_status scic_sds_remote_node_context_start_io(struct scic_sds_remote_node_context *sci_rnc,
struct scic_sds_request *sci_req);
#endif /* _SCIC_SDS_REMOTE_NODE_CONTEXT_H_ */
......@@ -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
* 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