diff options
Diffstat (limited to 'drivers/scsi/isci/events.h')
-rw-r--r-- | drivers/scsi/isci/events.h | 373 |
1 files changed, 0 insertions, 373 deletions
diff --git a/drivers/scsi/isci/events.h b/drivers/scsi/isci/events.h deleted file mode 100644 index fa2f6aa1093c..000000000000 --- a/drivers/scsi/isci/events.h +++ /dev/null | |||
@@ -1,373 +0,0 @@ | |||
1 | /* | ||
2 | * This file is provided under a dual BSD/GPLv2 license. When using or | ||
3 | * redistributing this file, you may do so under either license. | ||
4 | * | ||
5 | * GPL LICENSE SUMMARY | ||
6 | * | ||
7 | * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of version 2 of the GNU General Public License as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
21 | * The full GNU General Public License is included in this distribution | ||
22 | * in the file called LICENSE.GPL. | ||
23 | * | ||
24 | * BSD LICENSE | ||
25 | * | ||
26 | * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. | ||
27 | * All rights reserved. | ||
28 | * | ||
29 | * Redistribution and use in source and binary forms, with or without | ||
30 | * modification, are permitted provided that the following conditions | ||
31 | * are met: | ||
32 | * | ||
33 | * * Redistributions of source code must retain the above copyright | ||
34 | * notice, this list of conditions and the following disclaimer. | ||
35 | * * Redistributions in binary form must reproduce the above copyright | ||
36 | * notice, this list of conditions and the following disclaimer in | ||
37 | * the documentation and/or other materials provided with the | ||
38 | * distribution. | ||
39 | * * Neither the name of Intel Corporation nor the names of its | ||
40 | * contributors may be used to endorse or promote products derived | ||
41 | * from this software without specific prior written permission. | ||
42 | * | ||
43 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
44 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
45 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
46 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
47 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
48 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
49 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
50 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
51 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
52 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
53 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
54 | */ | ||
55 | |||
56 | #ifndef _ISCI_EVENT_H_ | ||
57 | #define _ISCI_EVENT_H_ | ||
58 | |||
59 | /** | ||
60 | * isci_event_timer_create() - This callback method asks the user to create a | ||
61 | * timer and provide a handle for this timer for use in further timer | ||
62 | * interactions. | ||
63 | * @controller: This parameter specifies the controller with which this timer | ||
64 | * is to be associated. | ||
65 | * @timer_callback: This parameter specifies the callback method to be invoked | ||
66 | * whenever the timer expires. | ||
67 | * @cookie: This parameter specifies a piece of information that the user must | ||
68 | * retain. This cookie is to be supplied by the user anytime a timeout | ||
69 | * occurs for the created timer. | ||
70 | * | ||
71 | * The "timer_callback" method should be executed in a mutually exlusive manner | ||
72 | * from the controller completion handler handler. This method returns a handle | ||
73 | * to a timer object created by the user. The handle will be utilized for all | ||
74 | * further interactions relating to this timer. | ||
75 | */ | ||
76 | void *isci_event_timer_create( | ||
77 | struct scic_sds_controller *controller, | ||
78 | void (*timer_callback)(void *), | ||
79 | void *cookie); | ||
80 | |||
81 | /** | ||
82 | * isci_event_timer_start() - This callback method asks the user to start the | ||
83 | * supplied timer. | ||
84 | * @controller: This parameter specifies the controller with which this timer | ||
85 | * is to associated. | ||
86 | * @timer: This parameter specifies the timer to be started. | ||
87 | * @milliseconds: This parameter specifies the number of milliseconds for which | ||
88 | * to stall. The operating system driver is allowed to round this value up | ||
89 | * where necessary. | ||
90 | * | ||
91 | * All timers in the system started by the SCI Core are one shot timers. | ||
92 | * Therefore, the SCI user should make sure that it removes the timer from it's | ||
93 | * list when a timer actually fires. Additionally, SCI Core user's should be | ||
94 | * able to handle calls from the SCI Core to stop a timer that may already be | ||
95 | * stopped. none | ||
96 | */ | ||
97 | void isci_event_timer_start( | ||
98 | struct scic_sds_controller *controller, | ||
99 | void *timer, | ||
100 | u32 milliseconds); | ||
101 | |||
102 | /** | ||
103 | * isci_event_timer_stop() - This callback method asks the user to stop the | ||
104 | * supplied timer. | ||
105 | * @controller: This parameter specifies the controller with which this timer | ||
106 | * is to associated. | ||
107 | * @timer: This parameter specifies the timer to be stopped. | ||
108 | * | ||
109 | */ | ||
110 | void isci_event_timer_stop( | ||
111 | struct scic_sds_controller *controller, | ||
112 | void *timer); | ||
113 | |||
114 | |||
115 | void isci_event_timer_destroy(struct scic_sds_controller *scic, void *timer); | ||
116 | |||
117 | /** | ||
118 | * isci_event_controller_start_complete() - This user callback will inform the | ||
119 | * user that the controller has finished the start process. | ||
120 | * @controller: This parameter specifies the controller that was started. | ||
121 | * @completion_status: This parameter specifies the results of the start | ||
122 | * operation. SCI_SUCCESS indicates successful completion. | ||
123 | * | ||
124 | */ | ||
125 | void isci_event_controller_start_complete( | ||
126 | struct scic_sds_controller *controller, | ||
127 | enum sci_status completion_status); | ||
128 | |||
129 | /** | ||
130 | * isci_event_controller_stop_complete() - This user callback will inform the | ||
131 | * user that the controller has finished the stop process. | ||
132 | * @controller: This parameter specifies the controller that was stopped. | ||
133 | * @completion_status: This parameter specifies the results of the stop | ||
134 | * operation. SCI_SUCCESS indicates successful completion. | ||
135 | * | ||
136 | */ | ||
137 | void isci_event_controller_stop_complete( | ||
138 | struct scic_sds_controller *controller, | ||
139 | enum sci_status completion_status); | ||
140 | |||
141 | /** | ||
142 | * isci_event_io_request_complete() - This user callback will inform the user | ||
143 | * that an IO request has completed. | ||
144 | * @controller: This parameter specifies the controller on which the IO is | ||
145 | * completing. | ||
146 | * @remote_device: This parameter specifies the remote device on which this IO | ||
147 | * request is completing. | ||
148 | * @io_request: This parameter specifies the IO request that has completed. | ||
149 | * @completion_status: This parameter specifies the results of the IO request | ||
150 | * operation. SCI_SUCCESS indicates successful completion. | ||
151 | * | ||
152 | */ | ||
153 | void isci_event_io_request_complete( | ||
154 | struct scic_sds_controller *controller, | ||
155 | struct scic_sds_remote_device *remote_device, | ||
156 | struct scic_sds_request *scic_io_request, | ||
157 | enum sci_io_status completion_status); | ||
158 | |||
159 | /** | ||
160 | * isci_event_task_request_complete() - This user callback will inform the user | ||
161 | * that a task management request completed. | ||
162 | * @controller: This parameter specifies the controller on which the task | ||
163 | * management request is completing. | ||
164 | * @remote_device: This parameter specifies the remote device on which this | ||
165 | * task management request is completing. | ||
166 | * @task_request: This parameter specifies the task management request that has | ||
167 | * completed. | ||
168 | * @completion_status: This parameter specifies the results of the IO request | ||
169 | * operation. SCI_SUCCESS indicates successful completion. | ||
170 | * | ||
171 | */ | ||
172 | void isci_event_task_request_complete( | ||
173 | struct scic_sds_controller *controller, | ||
174 | struct scic_sds_remote_device *remote_device, | ||
175 | struct scic_sds_request *scic_task_request, | ||
176 | enum sci_task_status completion_status); | ||
177 | |||
178 | /** | ||
179 | * isci_event_port_stop_complete() - This method informs the user when a stop | ||
180 | * operation on the port has completed. | ||
181 | * @controller: This parameter represents the controller which contains the | ||
182 | * port. | ||
183 | * @port: This parameter specifies the SCI port object for which the callback | ||
184 | * is being invoked. | ||
185 | * @completion_status: This parameter specifies the status for the operation | ||
186 | * being completed. | ||
187 | * | ||
188 | */ | ||
189 | void isci_event_port_stop_complete( | ||
190 | struct scic_sds_controller *controller, | ||
191 | struct scic_sds_port *port, | ||
192 | enum sci_status completion_status); | ||
193 | |||
194 | /** | ||
195 | * isci_event_port_hard_reset_complete() - This method informs the user when a | ||
196 | * hard reset on the port has completed. This hard reset could have been | ||
197 | * initiated by the user or by the remote port. | ||
198 | * @controller: This parameter represents the controller which contains the | ||
199 | * port. | ||
200 | * @port: This parameter specifies the SCI port object for which the callback | ||
201 | * is being invoked. | ||
202 | * @completion_status: This parameter specifies the status for the operation | ||
203 | * being completed. | ||
204 | * | ||
205 | */ | ||
206 | void isci_event_port_hard_reset_complete( | ||
207 | struct scic_sds_controller *controller, | ||
208 | struct scic_sds_port *port, | ||
209 | enum sci_status completion_status); | ||
210 | |||
211 | /** | ||
212 | * isci_event_port_ready() - This method informs the user that the port is now | ||
213 | * in a ready state and can be utilized to issue IOs. | ||
214 | * @controller: This parameter represents the controller which contains the | ||
215 | * port. | ||
216 | * @port: This parameter specifies the SCI port object for which the callback | ||
217 | * is being invoked. | ||
218 | * | ||
219 | */ | ||
220 | void isci_event_port_ready( | ||
221 | struct scic_sds_controller *controller, | ||
222 | struct scic_sds_port *port); | ||
223 | |||
224 | /** | ||
225 | * isci_event_port_not_ready() - This method informs the user that the port is | ||
226 | * now not in a ready (i.e. busy) state and can't be utilized to issue IOs. | ||
227 | * @controller: This parameter represents the controller which contains the | ||
228 | * port. | ||
229 | * @port: This parameter specifies the SCI port object for which the callback | ||
230 | * is being invoked. | ||
231 | * @reason_code: This parameter specifies the reason for the port not ready | ||
232 | * callback. | ||
233 | * | ||
234 | */ | ||
235 | void isci_event_port_not_ready( | ||
236 | struct scic_sds_controller *controller, | ||
237 | struct scic_sds_port *port, | ||
238 | u32 reason_code); | ||
239 | |||
240 | /** | ||
241 | * isci_event_port_invalid_link_up() - This method informs the SCI Core user | ||
242 | * that a phy/link became ready, but the phy is not allowed in the port. In | ||
243 | * some situations the underlying hardware only allows for certain phy to port | ||
244 | * mappings. If these mappings are violated, then this API is invoked. | ||
245 | * @controller: This parameter represents the controller which contains the | ||
246 | * port. | ||
247 | * @port: This parameter specifies the SCI port object for which the callback | ||
248 | * is being invoked. | ||
249 | * @phy: This parameter specifies the phy that came ready, but the phy can't be | ||
250 | * a valid member of the port. | ||
251 | * | ||
252 | */ | ||
253 | void isci_event_port_invalid_link_up( | ||
254 | struct scic_sds_controller *controller, | ||
255 | struct scic_sds_port *port, | ||
256 | struct scic_sds_phy *phy); | ||
257 | |||
258 | /** | ||
259 | * isci_event_port_bc_change_primitive_received() - This callback method informs | ||
260 | * the user that a broadcast change primitive was received. | ||
261 | * @controller: This parameter represents the controller which contains the | ||
262 | * port. | ||
263 | * @port: This parameter specifies the SCI port object for which the callback | ||
264 | * is being invoked. For instances where the phy on which the primitive was | ||
265 | * received is not part of a port, this parameter will be | ||
266 | * NULL. | ||
267 | * @phy: This parameter specifies the phy on which the primitive was received. | ||
268 | * | ||
269 | */ | ||
270 | void isci_event_port_bc_change_primitive_received( | ||
271 | struct scic_sds_controller *controller, | ||
272 | struct scic_sds_port *port, | ||
273 | struct scic_sds_phy *phy); | ||
274 | |||
275 | /** | ||
276 | * isci_event_port_link_up() - This callback method informs the user that a phy | ||
277 | * has become operational and is capable of communicating with the remote | ||
278 | * end point. | ||
279 | * @controller: This parameter represents the controller associated with the | ||
280 | * phy. | ||
281 | * @port: This parameter specifies the port object for which the user callback | ||
282 | * is being invoked. There may be conditions where this parameter can be | ||
283 | * NULL | ||
284 | * @phy: This parameter specifies the phy object for which the user callback is | ||
285 | * being invoked. | ||
286 | * | ||
287 | */ | ||
288 | void isci_event_port_link_up( | ||
289 | struct scic_sds_controller *controller, | ||
290 | struct scic_sds_port *port, | ||
291 | struct scic_sds_phy *phy); | ||
292 | |||
293 | /** | ||
294 | * isci_event_port_link_down() - This callback method informs the user that a | ||
295 | * phy is no longer operational and is not capable of communicating with the | ||
296 | * remote end point. | ||
297 | * @controller: This parameter represents the controller associated with the | ||
298 | * phy. | ||
299 | * @port: This parameter specifies the port object for which the user callback | ||
300 | * is being invoked. There may be conditions where this parameter can be | ||
301 | * NULL | ||
302 | * @phy: This parameter specifies the phy object for which the user callback is | ||
303 | * being invoked. | ||
304 | * | ||
305 | */ | ||
306 | void isci_event_port_link_down( | ||
307 | struct scic_sds_controller *controller, | ||
308 | struct scic_sds_port *port, | ||
309 | struct scic_sds_phy *phy); | ||
310 | |||
311 | /** | ||
312 | * isci_event_remote_device_start_complete() - This user callback method will | ||
313 | * inform the user that a start operation has completed. | ||
314 | * @controller: This parameter specifies the core controller associated with | ||
315 | * the completion callback. | ||
316 | * @remote_device: This parameter specifies the remote device associated with | ||
317 | * the completion callback. | ||
318 | * @completion_status: This parameter specifies the completion status for the | ||
319 | * operation. | ||
320 | * | ||
321 | */ | ||
322 | void isci_event_remote_device_start_complete( | ||
323 | struct scic_sds_controller *controller, | ||
324 | struct scic_sds_remote_device *remote_device, | ||
325 | enum sci_status completion_status); | ||
326 | |||
327 | /** | ||
328 | * isci_event_remote_device_stop_complete() - This user callback method will | ||
329 | * inform the user that a stop operation has completed. | ||
330 | * @controller: This parameter specifies the core controller associated with | ||
331 | * the completion callback. | ||
332 | * @remote_device: This parameter specifies the remote device associated with | ||
333 | * the completion callback. | ||
334 | * @completion_status: This parameter specifies the completion status for the | ||
335 | * operation. | ||
336 | * | ||
337 | */ | ||
338 | void isci_event_remote_device_stop_complete( | ||
339 | struct scic_sds_controller *controller, | ||
340 | struct scic_sds_remote_device *remote_device, | ||
341 | enum sci_status completion_status); | ||
342 | |||
343 | /** | ||
344 | * isci_event_remote_device_ready() - This user callback method will inform the | ||
345 | * user that a remote device is now capable of handling IO requests. | ||
346 | * @controller: This parameter specifies the core controller associated with | ||
347 | * the completion callback. | ||
348 | * @remote_device: This parameter specifies the remote device associated with | ||
349 | * the callback. | ||
350 | * | ||
351 | */ | ||
352 | void isci_event_remote_device_ready( | ||
353 | struct scic_sds_controller *controller, | ||
354 | struct scic_sds_remote_device *remote_device); | ||
355 | |||
356 | /** | ||
357 | * isci_event_remote_device_not_ready() - This user callback method will inform | ||
358 | * the user that a remote device is no longer capable of handling IO | ||
359 | * requests (until a ready callback is invoked). | ||
360 | * @controller: This parameter specifies the core controller associated with | ||
361 | * the completion callback. | ||
362 | * @remote_device: This parameter specifies the remote device associated with | ||
363 | * the callback. | ||
364 | * @reason_code: This paramete specifies the reason the remote device is not | ||
365 | * ready. | ||
366 | * | ||
367 | */ | ||
368 | void isci_event_remote_device_not_ready( | ||
369 | struct scic_sds_controller *controller, | ||
370 | struct scic_sds_remote_device *remote_device, | ||
371 | u32 reason_code); | ||
372 | |||
373 | #endif | ||