isci: kill sci_types.h
[deliverable/linux.git] / drivers / scsi / isci / core / scic_user_callback.h
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 _SCIC_USER_CALLBACK_H_
57 #define _SCIC_USER_CALLBACK_H_
58
59 /**
60 * This file contains all of the interface methods/macros that must be
61 * implemented by an SCI Core user.
62 *
63 *
64 */
65
66
67 #include "sci_status.h"
68 #include "scic_io_request.h"
69
70 struct scic_sds_request;
71 struct scic_sds_phy;
72 struct scic_sds_port;
73 struct scic_sds_remote_device;
74 struct scic_sds_controller;
75
76 /**
77 * scic_cb_timer_create() - This callback method asks the user to create a
78 * timer and provide a handle for this timer for use in further timer
79 * interactions.
80 * @controller: This parameter specifies the controller with which this timer
81 * is to be associated.
82 * @timer_callback: This parameter specifies the callback method to be invoked
83 * whenever the timer expires.
84 * @cookie: This parameter specifies a piece of information that the user must
85 * retain. This cookie is to be supplied by the user anytime a timeout
86 * occurs for the created timer.
87 *
88 * The "timer_callback" method should be executed in a mutually exlusive manner
89 * from the controller completion handler handler (refer to
90 * scic_controller_get_handler_methods()). This method returns a handle to a
91 * timer object created by the user. The handle will be utilized for all
92 * further interactions relating to this timer.
93 */
94 void *scic_cb_timer_create(
95 struct scic_sds_controller *controller,
96 void (*timer_callback)(void *),
97 void *cookie);
98
99
100 /**
101 * scic_cb_timer_start() - This callback method asks the user to start the
102 * supplied timer.
103 * @controller: This parameter specifies the controller with which this timer
104 * is to associated.
105 * @timer: This parameter specifies the timer to be started.
106 * @milliseconds: This parameter specifies the number of milliseconds for which
107 * to stall. The operating system driver is allowed to round this value up
108 * where necessary.
109 *
110 * All timers in the system started by the SCI Core are one shot timers.
111 * Therefore, the SCI user should make sure that it removes the timer from it's
112 * list when a timer actually fires. Additionally, SCI Core user's should be
113 * able to handle calls from the SCI Core to stop a timer that may already be
114 * stopped. none
115 */
116 void scic_cb_timer_start(
117 struct scic_sds_controller *controller,
118 void *timer,
119 u32 milliseconds);
120
121 /**
122 * scic_cb_timer_stop() - This callback method asks the user to stop the
123 * supplied timer.
124 * @controller: This parameter specifies the controller with which this timer
125 * is to associated.
126 * @timer: This parameter specifies the timer to be stopped.
127 *
128 */
129 void scic_cb_timer_stop(
130 struct scic_sds_controller *controller,
131 void *timer);
132
133 /**
134 * scic_cb_stall_execution() - This method is called when the core requires the
135 * OS driver to stall execution. This method is utilized during
136 * initialization or non-performance paths only.
137 * @microseconds: This parameter specifies the number of microseconds for which
138 * to stall. The operating system driver is allowed to round this value up
139 * where necessary.
140 *
141 * none.
142 */
143 void scic_cb_stall_execution(
144 u32 microseconds);
145
146 /**
147 * scic_cb_controller_start_complete() - This user callback will inform the
148 * user that the controller has finished the start process.
149 * @controller: This parameter specifies the controller that was started.
150 * @completion_status: This parameter specifies the results of the start
151 * operation. SCI_SUCCESS indicates successful completion.
152 *
153 */
154 void scic_cb_controller_start_complete(
155 struct scic_sds_controller *controller,
156 enum sci_status completion_status);
157
158 /**
159 * scic_cb_controller_stop_complete() - This user callback will inform the user
160 * that the controller has finished the stop process.
161 * @controller: This parameter specifies the controller that was stopped.
162 * @completion_status: This parameter specifies the results of the stop
163 * operation. SCI_SUCCESS indicates successful completion.
164 *
165 */
166 void scic_cb_controller_stop_complete(
167 struct scic_sds_controller *controller,
168 enum sci_status completion_status);
169
170 /**
171 * scic_cb_io_request_complete() - This user callback will inform the user that
172 * an IO request has completed.
173 * @controller: This parameter specifies the controller on which the IO is
174 * completing.
175 * @remote_device: This parameter specifies the remote device on which this IO
176 * request is completing.
177 * @io_request: This parameter specifies the IO request that has completed.
178 * @completion_status: This parameter specifies the results of the IO request
179 * operation. SCI_SUCCESS indicates successful completion.
180 *
181 */
182 void scic_cb_io_request_complete(
183 struct scic_sds_controller *controller,
184 struct scic_sds_remote_device *remote_device,
185 struct scic_sds_request *io_request,
186 enum sci_io_status completion_status);
187
188 /**
189 * scic_cb_task_request_complete() - This user callback will inform the user
190 * that a task management request completed.
191 * @controller: This parameter specifies the controller on which the task
192 * management request is completing.
193 * @remote_device: This parameter specifies the remote device on which this
194 * task management request is completing.
195 * @task_request: This parameter specifies the task management request that has
196 * completed.
197 * @completion_status: This parameter specifies the results of the IO request
198 * operation. SCI_SUCCESS indicates successful completion.
199 *
200 */
201 void scic_cb_task_request_complete(
202 struct scic_sds_controller *controller,
203 struct scic_sds_remote_device *remote_device,
204 struct scic_sds_request *task_request,
205 enum sci_task_status completion_status);
206
207 #ifndef SCI_GET_PHYSICAL_ADDRESS_OPTIMIZATION_ENABLED
208 /**
209 * scic_cb_io_request_get_physical_address() - This callback method asks the
210 * user to provide the physical address for the supplied virtual address
211 * when building an io request object.
212 * @controller: This parameter is the core controller object handle.
213 * @io_request: This parameter is the io request object handle for which the
214 * physical address is being requested.
215 * @virtual_address: This paramter is the virtual address which is to be
216 * returned as a physical address.
217 * @physical_address: The physical address for the supplied virtual address.
218 *
219 * None.
220 */
221 void scic_cb_io_request_get_physical_address(
222 struct scic_sds_controller *controller,
223 struct scic_sds_request *io_request,
224 void *virtual_address,
225 dma_addr_t *physical_address);
226 #endif /* SCI_GET_PHYSICAL_ADDRESS_OPTIMIZATION_ENABLED */
227
228 /**
229 * scic_cb_io_request_get_transfer_length() - This callback method asks the
230 * user to provide the number of bytes to be transfered as part of this
231 * request.
232 * @scic_user_io_request: This parameter points to the user's IO request
233 * object. It is a cookie that allows the user to provide the necessary
234 * information for this callback.
235 *
236 * This method returns the number of payload data bytes to be transfered for
237 * this IO request.
238 */
239 u32 scic_cb_io_request_get_transfer_length(
240 void *scic_user_io_request);
241
242 /**
243 * scic_cb_io_request_get_data_direction() - This callback method asks the user
244 * to provide the data direction for this request.
245 * @scic_user_io_request: This parameter points to the user's IO request
246 * object. It is a cookie that allows the user to provide the necessary
247 * information for this callback.
248 *
249 */
250 enum dma_data_direction scic_cb_io_request_get_data_direction(void *req);
251
252 #ifndef SCI_SGL_OPTIMIZATION_ENABLED
253 /**
254 * scic_cb_io_request_get_next_sge() - This callback method asks the user to
255 * provide the address to where the next Scatter-Gather Element is located.
256 * Details regarding usage: - Regarding the first SGE: the user should
257 * initialize an index, or a pointer, prior to construction of the request
258 * that will reference the very first scatter-gather element. This is
259 * important since this method is called for every scatter-gather element,
260 * including the first element. - Regarding the last SGE: the user should
261 * return NULL from this method when this method is called and the SGL has
262 * exhausted all elements.
263 * @scic_user_io_request: This parameter points to the user's IO request
264 * object. It is a cookie that allows the user to provide the necessary
265 * information for this callback.
266 * @current_sge_address: This parameter specifies the address for the current
267 * SGE (i.e. the one that has just processed).
268 * @next_sge: An address specifying the location for the next scatter gather
269 * element to be processed.
270 *
271 * None
272 */
273 void scic_cb_io_request_get_next_sge(
274 void *scic_user_io_request,
275 void *current_sge_address,
276 void **next_sge);
277 #endif /* SCI_SGL_OPTIMIZATION_ENABLED */
278
279 /**
280 * scic_cb_sge_get_address_field() - This callback method asks the user to
281 * provide the contents of the "address" field in the Scatter-Gather Element.
282 * @scic_user_io_request: This parameter points to the user's IO request
283 * object. It is a cookie that allows the user to provide the necessary
284 * information for this callback.
285 * @sge_address: This parameter specifies the address for the SGE from which to
286 * retrieve the address field.
287 *
288 * A physical address specifying the contents of the SGE's address field.
289 */
290 dma_addr_t scic_cb_sge_get_address_field(
291 void *scic_user_io_request,
292 void *sge_address);
293
294 /**
295 * scic_cb_sge_get_length_field() - This callback method asks the user to
296 * provide the contents of the "length" field in the Scatter-Gather Element.
297 * @scic_user_io_request: This parameter points to the user's IO request
298 * object. It is a cookie that allows the user to provide the necessary
299 * information for this callback.
300 * @sge_address: This parameter specifies the address for the SGE from which to
301 * retrieve the address field.
302 *
303 * This method returns the length field specified inside the SGE referenced by
304 * the sge_address parameter.
305 */
306 u32 scic_cb_sge_get_length_field(
307 void *scic_user_io_request,
308 void *sge_address);
309
310 /**
311 * scic_cb_ssp_io_request_get_cdb_address() - This callback method asks the
312 * user to provide the address for the command descriptor block (CDB)
313 * associated with this IO request.
314 * @scic_user_io_request: This parameter points to the user's IO request
315 * object. It is a cookie that allows the user to provide the necessary
316 * information for this callback.
317 *
318 * This method returns the virtual address of the CDB.
319 */
320 void *scic_cb_ssp_io_request_get_cdb_address(
321 void *scic_user_io_request);
322
323 /**
324 * scic_cb_ssp_io_request_get_cdb_length() - This callback method asks the user
325 * to provide the length of the command descriptor block (CDB) associated
326 * with this IO request.
327 * @scic_user_io_request: This parameter points to the user's IO request
328 * object. It is a cookie that allows the user to provide the necessary
329 * information for this callback.
330 *
331 * This method returns the length of the CDB.
332 */
333 u32 scic_cb_ssp_io_request_get_cdb_length(
334 void *scic_user_io_request);
335
336 /**
337 * scic_cb_ssp_io_request_get_lun() - This callback method asks the user to
338 * provide the Logical Unit (LUN) associated with this IO request.
339 * @scic_user_io_request: This parameter points to the user's IO request
340 * object. It is a cookie that allows the user to provide the necessary
341 * information for this callback.
342 *
343 * The contents of the value returned from this callback are defined by the
344 * protocol standard (e.g. T10 SAS specification). Please refer to the
345 * transport command information unit description in the associated standard.
346 * This method returns the LUN associated with this request. This should be u64?
347 */
348 u32 scic_cb_ssp_io_request_get_lun(
349 void *scic_user_io_request);
350
351 /**
352 * scic_cb_ssp_io_request_get_task_attribute() - This callback method asks the
353 * user to provide the task attribute associated with this IO request.
354 * @scic_user_io_request: This parameter points to the user's IO request
355 * object. It is a cookie that allows the user to provide the necessary
356 * information for this callback.
357 *
358 * The contents of the value returned from this callback are defined by the
359 * protocol standard (e.g. T10 SAS specification). Please refer to the
360 * transport command information unit description in the associated standard.
361 * This method returns the task attribute associated with this IO request.
362 */
363 u32 scic_cb_ssp_io_request_get_task_attribute(
364 void *scic_user_io_request);
365
366 /**
367 * scic_cb_ssp_io_request_get_command_priority() - This callback method asks
368 * the user to provide the command priority associated with this IO request.
369 * @scic_user_io_request: This parameter points to the user's IO request
370 * object. It is a cookie that allows the user to provide the necessary
371 * information for this callback.
372 *
373 * The contents of the value returned from this callback are defined by the
374 * protocol standard (e.g. T10 SAS specification). Please refer to the
375 * transport command information unit description in the associated standard.
376 * This method returns the command priority associated with this IO request.
377 */
378 u32 scic_cb_ssp_io_request_get_command_priority(
379 void *scic_user_io_request);
380
381 /**
382 * scic_cb_io_request_do_copy_rx_frames() - This callback method asks the user
383 * if the received RX frame data is to be copied to the SGL or should be
384 * stored by the SCI core to be retrieved later with the
385 * scic_io_request_get_rx_frame().
386 * @scic_user_io_request: This parameter points to the user's IO request
387 * object. It is a cookie that allows the user to provide the necessary
388 * information for this callback.
389 *
390 * This method returns true if the SCI core should copy the received frame data
391 * to the SGL location or false if the SCI user wants to retrieve the frame
392 * data at a later time.
393 */
394 bool scic_cb_io_request_do_copy_rx_frames(
395 void *scic_user_io_request);
396
397 /**
398 * scic_cb_request_get_sat_protocol() - This callback method asks the user to
399 * return the SAT protocol definition for this IO request. This method is
400 * only called by the SCI core if the request type constructed is SATA.
401 * @scic_user_io_request: This parameter points to the user's IO request
402 * object. It is a cookie that allows the user to provide the necessary
403 * information for this callback.
404 *
405 * This method returns one of the sat.h defined protocols for the given io
406 * request.
407 */
408 u8 scic_cb_request_get_sat_protocol(
409 void *scic_user_io_request);
410
411
412 /**
413 * scic_cb_ssp_task_request_get_lun() - This method returns the Logical Unit to
414 * be utilized for this task management request.
415 * @scic_user_task_request: This parameter points to the user's task request
416 * object. It is a cookie that allows the user to provide the necessary
417 * information for this callback.
418 *
419 * The contents of the value returned from this callback are defined by the
420 * protocol standard (e.g. T10 SAS specification). Please refer to the
421 * transport task information unit description in the associated standard. This
422 * method returns the LUN associated with this request. This should be u64?
423 */
424 u32 scic_cb_ssp_task_request_get_lun(
425 void *scic_user_task_request);
426
427 /**
428 * scic_cb_ssp_task_request_get_function() - This method returns the task
429 * management function to be utilized for this task request.
430 * @scic_user_task_request: This parameter points to the user's task request
431 * object. It is a cookie that allows the user to provide the necessary
432 * information for this callback.
433 *
434 * The contents of the value returned from this callback are defined by the
435 * protocol standard (e.g. T10 SAS specification). Please refer to the
436 * transport task information unit description in the associated standard. This
437 * method returns an unsigned byte representing the task management function to
438 * be performed.
439 */
440 u8 scic_cb_ssp_task_request_get_function(
441 void *scic_user_task_request);
442
443 /**
444 * scic_cb_ssp_task_request_get_io_tag_to_manage() - This method returns the
445 * task management IO tag to be managed. Depending upon the task management
446 * function the value returned from this method may be ignored.
447 * @scic_user_task_request: This parameter points to the user's task request
448 * object. It is a cookie that allows the user to provide the necessary
449 * information for this callback.
450 *
451 * This method returns an unsigned 16-bit word depicting the IO tag to be
452 * managed.
453 */
454 u16 scic_cb_ssp_task_request_get_io_tag_to_manage(
455 void *scic_user_task_request);
456
457 /**
458 * scic_cb_ssp_task_request_get_response_data_address() - This callback method
459 * asks the user to provide the virtual address of the response data buffer
460 * for the supplied IO request.
461 * @scic_user_task_request: This parameter points to the user's task request
462 * object. It is a cookie that allows the user to provide the necessary
463 * information for this callback.
464 *
465 * This method returns the virtual address for the response data buffer
466 * associated with this IO request.
467 */
468 void *scic_cb_ssp_task_request_get_response_data_address(
469 void *scic_user_task_request);
470
471 /**
472 * scic_cb_ssp_task_request_get_response_data_length() - This callback method
473 * asks the user to provide the length of the response data buffer for the
474 * supplied IO request.
475 * @scic_user_task_request: This parameter points to the user's task request
476 * object. It is a cookie that allows the user to provide the necessary
477 * information for this callback.
478 *
479 * This method returns the length of the response buffer data associated with
480 * this IO request.
481 */
482 u32 scic_cb_ssp_task_request_get_response_data_length(
483 void *scic_user_task_request);
484
485 /**
486 * scic_cb_pci_get_bar() - In this method the user must return the base address
487 * register (BAR) value for the supplied base address register number.
488 * @controller: The controller for which to retrieve the bar number.
489 * @bar_number: This parameter depicts the BAR index/number to be read.
490 *
491 * Return a pointer value indicating the contents of the BAR. NULL indicates an
492 * invalid BAR index/number was specified. All other values indicate a valid
493 * VIRTUAL address from the BAR.
494 */
495 void *scic_cb_pci_get_bar(
496 struct scic_sds_controller *controller,
497 u16 bar_number);
498
499 /**
500 * scic_cb_get_virtual_address() - This callback method asks the user to
501 * provide the virtual address for the supplied physical address.
502 * @controller: This parameter is the core controller object handle.
503 * @physical_address: This parameter is the physical address which is to be
504 * returned as a virtual address.
505 *
506 * The method returns the virtual address for the supplied physical address.
507 */
508 void *scic_cb_get_virtual_address(
509 struct scic_sds_controller *controller,
510 dma_addr_t physical_address);
511
512 /**
513 * scic_cb_port_stop_complete() - This method informs the user when a stop
514 * operation on the port has completed.
515 * @controller: This parameter represents the controller which contains the
516 * port.
517 * @port: This parameter specifies the SCI port object for which the callback
518 * is being invoked.
519 * @completion_status: This parameter specifies the status for the operation
520 * being completed.
521 *
522 */
523 void scic_cb_port_stop_complete(
524 struct scic_sds_controller *controller,
525 struct scic_sds_port *port,
526 enum sci_status completion_status);
527
528 /**
529 * scic_cb_port_hard_reset_complete() - This method informs the user when a
530 * hard reset on the port has completed. This hard reset could have been
531 * initiated by the user or by the remote port.
532 * @controller: This parameter represents the controller which contains the
533 * port.
534 * @port: This parameter specifies the SCI port object for which the callback
535 * is being invoked.
536 * @completion_status: This parameter specifies the status for the operation
537 * being completed.
538 *
539 */
540 void scic_cb_port_hard_reset_complete(
541 struct scic_sds_controller *controller,
542 struct scic_sds_port *port,
543 enum sci_status completion_status);
544
545 /**
546 * scic_cb_port_ready() - This method informs the user that the port is now in
547 * a ready state and can be utilized to issue IOs.
548 * @controller: This parameter represents the controller which contains the
549 * port.
550 * @port: This parameter specifies the SCI port object for which the callback
551 * is being invoked.
552 *
553 */
554 void scic_cb_port_ready(
555 struct scic_sds_controller *controller,
556 struct scic_sds_port *port);
557
558 /**
559 * scic_cb_port_not_ready() - This method informs the user that the port is now
560 * not in a ready (i.e. busy) state and can't be utilized to issue IOs.
561 * @controller: This parameter represents the controller which contains the
562 * port.
563 * @port: This parameter specifies the SCI port object for which the callback
564 * is being invoked.
565 * @reason_code: This parameter specifies the reason for the port not ready
566 * callback.
567 *
568 */
569 void scic_cb_port_not_ready(
570 struct scic_sds_controller *controller,
571 struct scic_sds_port *port,
572 u32 reason_code);
573
574 /**
575 * scic_cb_port_invalid_link_up() - This method informs the SCI Core user that
576 * a phy/link became ready, but the phy is not allowed in the port. In some
577 * situations the underlying hardware only allows for certain phy to port
578 * mappings. If these mappings are violated, then this API is invoked.
579 * @controller: This parameter represents the controller which contains the
580 * port.
581 * @port: This parameter specifies the SCI port object for which the callback
582 * is being invoked.
583 * @phy: This parameter specifies the phy that came ready, but the phy can't be
584 * a valid member of the port.
585 *
586 */
587 void scic_cb_port_invalid_link_up(
588 struct scic_sds_controller *controller,
589 struct scic_sds_port *port,
590 struct scic_sds_phy *phy);
591
592 /**
593 * scic_cb_port_bc_change_primitive_received() - This callback method informs
594 * the user that a broadcast change primitive was received.
595 * @controller: This parameter represents the controller which contains the
596 * port.
597 * @port: This parameter specifies the SCI port object for which the callback
598 * is being invoked. For instances where the phy on which the primitive was
599 * received is not part of a port, this parameter will be
600 * NULL.
601 * @phy: This parameter specifies the phy on which the primitive was received.
602 *
603 */
604 void scic_cb_port_bc_change_primitive_received(
605 struct scic_sds_controller *controller,
606 struct scic_sds_port *port,
607 struct scic_sds_phy *phy);
608
609
610
611
612 /**
613 * scic_cb_port_link_up() - This callback method informs the user that a phy
614 * has become operational and is capable of communicating with the remote
615 * end point.
616 * @controller: This parameter represents the controller associated with the
617 * phy.
618 * @port: This parameter specifies the port object for which the user callback
619 * is being invoked. There may be conditions where this parameter can be
620 * NULL
621 * @phy: This parameter specifies the phy object for which the user callback is
622 * being invoked.
623 *
624 */
625 void scic_cb_port_link_up(
626 struct scic_sds_controller *controller,
627 struct scic_sds_port *port,
628 struct scic_sds_phy *phy);
629
630 /**
631 * scic_cb_port_link_down() - This callback method informs the user that a phy
632 * is no longer operational and is not capable of communicating with the
633 * remote end point.
634 * @controller: This parameter represents the controller associated with the
635 * phy.
636 * @port: This parameter specifies the port object for which the user callback
637 * is being invoked. There may be conditions where this parameter can be
638 * NULL
639 * @phy: This parameter specifies the phy object for which the user callback is
640 * being invoked.
641 *
642 */
643 void scic_cb_port_link_down(
644 struct scic_sds_controller *controller,
645 struct scic_sds_port *port,
646 struct scic_sds_phy *phy);
647
648 /**
649 * scic_cb_remote_device_start_complete() - This user callback method will
650 * inform the user that a start operation has completed.
651 * @controller: This parameter specifies the core controller associated with
652 * the completion callback.
653 * @remote_device: This parameter specifies the remote device associated with
654 * the completion callback.
655 * @completion_status: This parameter specifies the completion status for the
656 * operation.
657 *
658 */
659 void scic_cb_remote_device_start_complete(
660 struct scic_sds_controller *controller,
661 struct scic_sds_remote_device *remote_device,
662 enum sci_status completion_status);
663
664 /**
665 * scic_cb_remote_device_stop_complete() - This user callback method will
666 * inform the user that a stop operation has completed.
667 * @controller: This parameter specifies the core controller associated with
668 * the completion callback.
669 * @remote_device: This parameter specifies the remote device associated with
670 * the completion callback.
671 * @completion_status: This parameter specifies the completion status for the
672 * operation.
673 *
674 */
675 void scic_cb_remote_device_stop_complete(
676 struct scic_sds_controller *controller,
677 struct scic_sds_remote_device *remote_device,
678 enum sci_status completion_status);
679
680 /**
681 * scic_cb_remote_device_ready() - This user callback method will inform the
682 * user that a remote device is now capable of handling IO requests.
683 * @controller: This parameter specifies the core controller associated with
684 * the completion callback.
685 * @remote_device: This parameter specifies the remote device associated with
686 * the callback.
687 *
688 */
689 void scic_cb_remote_device_ready(
690 struct scic_sds_controller *controller,
691 struct scic_sds_remote_device *remote_device);
692
693 /**
694 * scic_cb_remote_device_not_ready() - This user callback method will inform
695 * the user that a remote device is no longer capable of handling IO
696 * requests (until a ready callback is invoked).
697 * @controller: This parameter specifies the core controller associated with
698 * the completion callback.
699 * @remote_device: This parameter specifies the remote device associated with
700 * the callback.
701 * @reason_code: This paramete specifies the reason the remote device is not
702 * ready.
703 *
704 */
705 void scic_cb_remote_device_not_ready(
706 struct scic_sds_controller *controller,
707 struct scic_sds_remote_device *remote_device,
708 u32 reason_code);
709
710 #if !defined(DISABLE_ATAPI)
711 /**
712 * scic_cb_stp_packet_io_request_get_cdb_address() - This user callback gets
713 * from stp packet io's user request the CDB address.
714 * @scic_user_io_request:
715 *
716 * The cdb adress.
717 */
718 void *scic_cb_stp_packet_io_request_get_cdb_address(
719 void *scic_user_io_request);
720
721 /**
722 * scic_cb_stp_packet_io_request_get_cdb_length() - This user callback gets
723 * from stp packet io's user request the CDB length.
724 * @scic_user_io_request:
725 *
726 * The cdb length.
727 */
728 u32 scic_cb_stp_packet_io_request_get_cdb_length(
729 void *scic_user_io_request);
730 #else /* !defined(DISABLE_ATAPI) */
731 #define scic_cb_stp_packet_io_request_get_cdb_address(scic_user_io_request) NULL
732 #define scic_cb_stp_packet_io_request_get_cdb_length(scic_user_io_request) 0
733 #endif /* !defined(DISABLE_ATAPI) */
734
735
736 #endif /* _SCIC_USER_CALLBACK_H_ */
737
This page took 0.051637 seconds and 5 git commands to generate.