diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-05-12 11:50:23 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:49 -0400 |
commit | ed3efb7784cb0772558e9cc9440bd6c9a3139be4 (patch) | |
tree | c61c9ec150b30b0c4ba85075a481f6c124a56b33 /drivers/scsi/isci/remote_node_context.h | |
parent | c845ae96bcb1625a093003248ffaf13b92a81ac2 (diff) |
isci: unify rnc suspend/resume handlers
Unify rnc suspend/resume handlers and delete the state handlers.
Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/remote_node_context.h')
-rw-r--r-- | drivers/scsi/isci/remote_node_context.h | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/drivers/scsi/isci/remote_node_context.h b/drivers/scsi/isci/remote_node_context.h index 1cd32343829..68983748eba 100644 --- a/drivers/scsi/isci/remote_node_context.h +++ b/drivers/scsi/isci/remote_node_context.h | |||
@@ -90,13 +90,6 @@ typedef enum sci_status (*scic_sds_remote_node_context_operation)( | |||
90 | void *callback_parameter | 90 | void *callback_parameter |
91 | ); | 91 | ); |
92 | 92 | ||
93 | typedef enum sci_status (*scic_sds_remote_node_context_suspend_operation)( | ||
94 | struct scic_sds_remote_node_context *sci_rnc, | ||
95 | u32 suspension_type, | ||
96 | scics_sds_remote_node_context_callback callback, | ||
97 | void *callback_parameter | ||
98 | ); | ||
99 | |||
100 | typedef enum sci_status (*scic_sds_remote_node_context_io_request)( | 93 | typedef enum sci_status (*scic_sds_remote_node_context_io_request)( |
101 | struct scic_sds_remote_node_context *sci_rnc, | 94 | struct scic_sds_remote_node_context *sci_rnc, |
102 | struct scic_sds_request *sci_req | 95 | struct scic_sds_request *sci_req |
@@ -104,19 +97,6 @@ typedef enum sci_status (*scic_sds_remote_node_context_io_request)( | |||
104 | 97 | ||
105 | struct scic_sds_remote_node_context_handlers { | 98 | struct scic_sds_remote_node_context_handlers { |
106 | /** | 99 | /** |
107 | * This handler is invoked when there is a request to suspend the RNC. The | ||
108 | * callback is invoked after the hardware notification that the remote node is | ||
109 | * suspended. | ||
110 | */ | ||
111 | scic_sds_remote_node_context_suspend_operation suspend_handler; | ||
112 | |||
113 | /** | ||
114 | * This handler is invoked when there is a request to resume the RNC. The | ||
115 | * callback is invoked when after the RNC has reached the ready state. | ||
116 | */ | ||
117 | scic_sds_remote_node_context_operation resume_handler; | ||
118 | |||
119 | /** | ||
120 | * This handler is invoked when there is a request to start an io request | 100 | * This handler is invoked when there is a request to start an io request |
121 | * operation. | 101 | * operation. |
122 | */ | 102 | */ |
@@ -260,11 +240,15 @@ enum sci_status scic_sds_remote_node_context_event_handler(struct scic_sds_remot | |||
260 | enum sci_status scic_sds_remote_node_context_destruct(struct scic_sds_remote_node_context *sci_rnc, | 240 | enum sci_status scic_sds_remote_node_context_destruct(struct scic_sds_remote_node_context *sci_rnc, |
261 | scics_sds_remote_node_context_callback callback, | 241 | scics_sds_remote_node_context_callback callback, |
262 | void *callback_parameter); | 242 | void *callback_parameter); |
263 | #define scic_sds_remote_node_context_resume(rnc, callback, parameter) \ | ||
264 | ((rnc)->state_handlers->resume_handler(rnc, callback, parameter)) | ||
265 | 243 | ||
266 | #define scic_sds_remote_node_context_suspend(rnc, suspend_type, callback, parameter) \ | 244 | enum sci_status scic_sds_remote_node_context_suspend(struct scic_sds_remote_node_context *sci_rnc, |
267 | ((rnc)->state_handlers->suspend_handler(rnc, suspend_type, callback, parameter)) | 245 | u32 suspend_type, |
246 | scics_sds_remote_node_context_callback cb_fn, | ||
247 | void *cb_p); | ||
248 | |||
249 | enum sci_status scic_sds_remote_node_context_resume(struct scic_sds_remote_node_context *sci_rnc, | ||
250 | scics_sds_remote_node_context_callback cb_fn, | ||
251 | void *cb_p); | ||
268 | 252 | ||
269 | #define scic_sds_remote_node_context_start_io(rnc, request) \ | 253 | #define scic_sds_remote_node_context_start_io(rnc, request) \ |
270 | ((rnc)->state_handlers->start_io_handler(rnc, request)) | 254 | ((rnc)->state_handlers->start_io_handler(rnc, request)) |