xref: /freebsd/sys/dev/isci/scil/scic_sds_remote_device.h (revision 5e3190f700637fcfc1a52daeaa4a031fdd2557c7)
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0
3  *
4  * This file is provided under a dual BSD/GPLv2 license.  When using or
5  * redistributing this file, you may do so under either license.
6  *
7  * GPL LICENSE SUMMARY
8  *
9  * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of version 2 of the GNU General Public License as
13  * published by the Free Software Foundation.
14  *
15  * This program is distributed in the hope that it will be useful, but
16  * WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
23  * The full GNU General Public License is included in this distribution
24  * in the file called LICENSE.GPL.
25  *
26  * BSD LICENSE
27  *
28  * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
29  * All rights reserved.
30  *
31  * Redistribution and use in source and binary forms, with or without
32  * modification, are permitted provided that the following conditions
33  * are met:
34  *
35  *   * Redistributions of source code must retain the above copyright
36  *     notice, this list of conditions and the following disclaimer.
37  *   * Redistributions in binary form must reproduce the above copyright
38  *     notice, this list of conditions and the following disclaimer in
39  *     the documentation and/or other materials provided with the
40  *     distribution.
41  *
42  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
43  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
44  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
45  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
46  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
47  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
48  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
49  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
50  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
52  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53  */
54 #ifndef _SCIC_SDS_REMOTE_DEVICE_H_
55 #define _SCIC_SDS_REMOTE_DEVICE_H_
56 
57 /**
58  * @file
59  *
60  * @brief This file contains the structures, constants, and prototypes for the
61  *        SCIC_SDS_REMOTE_DEVICE object.
62  */
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif // __cplusplus
67 
68 #include <dev/isci/scil/intel_sas.h>
69 #include <dev/isci/scil/sci_base_remote_device.h>
70 #include <dev/isci/scil/sci_base_request.h>
71 #include <dev/isci/scil/sci_base_state_machine_logger.h>
72 #include <dev/isci/scil/scu_remote_node_context.h>
73 #include <dev/isci/scil/scic_sds_remote_node_context.h>
74 
75 struct SCIC_SDS_CONTROLLER;
76 struct SCIC_SDS_PORT;
77 struct SCIC_SDS_REQUEST;
78 struct SCIC_SDS_REMOTE_DEVICE_STATE_HANDLER;
79 
80 /**
81  * @enum SCIC_SDS_SSP_REMOTE_DEVICE_READY_SUBSTATES
82  *
83  * This is the enumeration of the ready substates for the
84  * SCIC_SDS_REMOTE_DEVICE.
85  */
86 enum SCIC_SDS_SSP_REMOTE_DEVICE_READY_SUBSTATES
87 {
88    /**
89     * This is the initial state for the remote device ready substate.
90     */
91    SCIC_SDS_SSP_REMOTE_DEVICE_READY_SUBSTATE_INITIAL,
92 
93    /**
94     * This is the ready operational substate for the remote device.  This is the
95     * normal operational state for a remote device.
96     */
97    SCIC_SDS_SSP_REMOTE_DEVICE_READY_SUBSTATE_OPERATIONAL,
98 
99    /**
100     * This is the suspended state for the remote device.  This is the state that
101     * the device is placed in when a RNC suspend is received by the SCU hardware.
102     */
103    SCIC_SDS_SSP_REMOTE_DEVICE_READY_SUBSTATE_SUSPENDED,
104 
105    /**
106     * This is the final state that the device is placed in before a change to the
107     * base state machine.
108     */
109    SCIC_SDS_SSP_REMOTE_DEVICE_READY_SUBSTATE_FINAL,
110 
111    SCIC_SDS_SSP_REMOTE_DEVICE_READY_MAX_SUBSTATES
112 };
113 
114 /**
115  * @enum SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATES
116  *
117  * This is the enumeration for the SCIC_SDS_REMOTE_DEVICE ready substates for
118  * the STP remote device.
119  */
120 enum SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATES
121 {
122    /**
123     * This is the idle substate for the stp remote device.  When there are no
124     * active IO for the device it is in this state.
125     */
126    SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_IDLE,
127 
128    /**
129     * This is the command state for the STP remote device.  This state is
130     * entered when the device is processing a non-NCQ command.  The device object
131     * will fail any new start IO requests until this command is complete.
132     */
133    SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_CMD,
134 
135    /**
136     * This is the NCQ state for the STP remote device.  This state is entered
137     * when the device is processing an NCQ request.  It will remain in this state
138     * so long as there is one or more NCQ requests being processed.
139     */
140    SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ,
141 
142    /**
143     * This is the NCQ error state for the STP remote device.  This state is
144     * entered when an SDB error FIS is received by the device object while in the
145     * NCQ state.  The device object will only accept a READ LOG command while in
146     * this state.
147     */
148    SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ_ERROR,
149 
150 #if !defined(DISABLE_ATAPI)
151    /**
152     * This is the ATAPI error state for the STP ATAPI remote device.  This state is
153     * entered when ATAPI device sends error status FIS without data while the device
154     * object is in CMD state. A suspension event is expected in this state. The device
155     * object will resume right away.
156     */
157    SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_ATAPI_ERROR,
158 #endif
159 
160    /**
161     * This is the READY substate indicates the device is waiting for the RESET task
162     * coming to be recovered from certain hardware specific error.
163     */
164    SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_AWAIT_RESET,
165 
166    SCIC_SDS_STP_REMOTE_DEVICE_READY_MAX_SUBSTATES
167 };
168 
169 
170 /**
171  * @enum SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATES
172  *
173  * This is the enumeration of the ready substates for the SMP REMOTE DEVICE.
174  */
175 
176 enum SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATES
177 {
178    /**
179     * This is the ready operational substate for the remote device.  This is the
180     * normal operational state for a remote device.
181     */
182    SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE,
183 
184    /**
185     * This is the suspended state for the remote device.  This is the state that
186     * the device is placed in when a RNC suspend is received by the SCU hardware.
187     */
188    SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD,
189 
190    SCIC_SDS_SMP_REMOTE_DEVICE_READY_MAX_SUBSTATES
191 };
192 
193 
194 
195 
196 /**
197  * @struct SCIC_SDS_REMOTE_DEVICE
198  *
199  * @brief  This structure contains the data for an SCU implementation of
200  *         the SCU Core device data.
201  */
202 typedef struct SCIC_SDS_REMOTE_DEVICE
203 {
204    /**
205     * This field is the common base for all remote device objects.
206     */
207    SCI_BASE_REMOTE_DEVICE_T parent;
208 
209    /**
210     * This field is the programmed device port width.  This value is written to
211     * the RCN data structure to tell the SCU how many open connections this
212     * device can have.
213     */
214    U32 device_port_width;
215 
216    /**
217     * This field is the programmed connection rate for this remote device.  It is
218     * used to program the TC with the maximum allowed connection rate.
219     */
220    SCI_SAS_LINK_RATE connection_rate;
221 
222    /**
223     * This field contains the allowed target protocols for this remote device.
224     */
225    SMP_DISCOVER_RESPONSE_PROTOCOLS_T target_protocols;
226 
227    /**
228     * This field contains the device SAS address.
229     */
230    SCI_SAS_ADDRESS_T device_address;
231 
232    /**
233     * This filed is assigned the value of TRUE if the device is directly attached
234     * to the port.
235     */
236    BOOL is_direct_attached;
237 
238 #if !defined(DISABLE_ATAPI)
239    /**
240     * This filed is assigned the value of TRUE if the device is an ATAPI device.
241     */
242    BOOL is_atapi;
243 #endif
244 
245    /**
246     * This filed contains a pointer back to the port to which this device is
247     * assigned.
248     */
249    struct SCIC_SDS_PORT *owning_port;
250 
251    /**
252     * This field contains the SCU silicon remote node context specific
253     * information.
254     */
255    struct SCIC_SDS_REMOTE_NODE_CONTEXT * rnc;
256 
257    /**
258     * This field contains the stated request count for the remote device.  The
259     * device can not reach the SCI_BASE_REMOTE_DEVICE_STATE_STOPPED until all
260     * requests are complete and the rnc_posted value is FALSE.
261     */
262    U32 started_request_count;
263 
264    /**
265     * This field contains a pointer to the working request object.  It is only
266     * used only for SATA requests since the unsolicited frames we get from the
267     * hardware have no Tag value to look up the io request object.
268     */
269    struct SCIC_SDS_REQUEST * working_request;
270 
271    /**
272     * This field contains the reason for the remote device going not_ready.  It is
273     * assigned in the state handlers and used in the state transition.
274     */
275    U32 not_ready_reason;
276 
277    /**
278     * This field is TRUE if this remote device has an initialized ready substate
279     * machine. SSP devices do not have a ready substate machine and STP devices
280     * have a ready substate machine.
281     */
282    BOOL has_ready_substate_machine;
283 
284    /**
285     * This field contains the state machine for the ready substate machine for
286     * this SCIC_SDS_REMOTE_DEVICE object.
287     */
288    SCI_BASE_STATE_MACHINE_T ready_substate_machine;
289 
290    /**
291     * This field maintains the set of state handlers for the remote device
292     * object.  These are changed each time the remote device enters a new state.
293     */
294    struct SCIC_SDS_REMOTE_DEVICE_STATE_HANDLER *state_handlers;
295 
296    #ifdef SCI_LOGGING
297    /**
298     * This field conatins the ready substate machine logger.  The logger will
299     * emit a message each time the ready substate machine changes state.
300     */
301    SCI_BASE_STATE_MACHINE_LOGGER_T ready_substate_machine_logger;
302    #endif
303 
304 } SCIC_SDS_REMOTE_DEVICE_T;
305 
306 
307 typedef SCI_STATUS (*SCIC_SDS_REMOTE_DEVICE_HANDLER_T)(
308                                  SCIC_SDS_REMOTE_DEVICE_T *this_device);
309 
310 typedef SCI_STATUS (*SCIC_SDS_REMOTE_DEVICE_SUSPEND_HANDLER_T)(
311                                  SCIC_SDS_REMOTE_DEVICE_T *this_device,
312                                  U32                       suspend_type);
313 
314 typedef SCI_STATUS (*SCIC_SDS_REMOTE_DEVICE_RESUME_HANDLER_T)(
315                                  SCIC_SDS_REMOTE_DEVICE_T *this_device);
316 
317 typedef SCI_STATUS (*SCIC_SDS_REMOTE_DEVICE_FRAME_HANDLER_T)(
318                                   SCIC_SDS_REMOTE_DEVICE_T *this_device,
319                                   U32                       frame_index);
320 
321 typedef SCI_STATUS (*SCIC_SDS_REMOTE_DEVICE_EVENT_HANDLER_T)(
322                                   SCIC_SDS_REMOTE_DEVICE_T *this_device,
323                                   U32                       event_code);
324 
325 typedef void (*SCIC_SDS_REMOTE_DEVICE_READY_NOT_READY_HANDLER_T)(
326                                   SCIC_SDS_REMOTE_DEVICE_T *this_device);
327 
328 /**
329  * @struct SCIC_SDS_REMOTE_DEVICE_STATE_HANDLER
330  * @brief This structure conains the state handlers that are needed to
331  *        process requests for the SCU remote device objects.
332  */
333 typedef struct SCIC_SDS_REMOTE_DEVICE_STATE_HANDLER
334 {
335    SCI_BASE_REMOTE_DEVICE_STATE_HANDLER_T parent;
336 
337    SCIC_SDS_REMOTE_DEVICE_SUSPEND_HANDLER_T suspend_handler;
338    SCIC_SDS_REMOTE_DEVICE_RESUME_HANDLER_T  resume_handler;
339 
340    SCIC_SDS_REMOTE_DEVICE_EVENT_HANDLER_T event_handler;
341    SCIC_SDS_REMOTE_DEVICE_FRAME_HANDLER_T frame_handler;
342 
343 } SCIC_SDS_REMOTE_DEVICE_STATE_HANDLER_T;
344 
345 
346 extern SCI_BASE_STATE_T scic_sds_remote_device_state_table[];
347 extern SCI_BASE_STATE_T scic_sds_ssp_remote_device_ready_substate_table[];
348 extern SCI_BASE_STATE_T scic_sds_stp_remote_device_ready_substate_table[];
349 extern SCI_BASE_STATE_T scic_sds_smp_remote_device_ready_substate_table[];
350 
351 extern SCIC_SDS_REMOTE_DEVICE_STATE_HANDLER_T
352                scic_sds_remote_device_state_handler_table[];
353 extern SCIC_SDS_REMOTE_DEVICE_STATE_HANDLER_T
354                scic_sds_ssp_remote_device_ready_substate_handler_table[];
355 extern SCIC_SDS_REMOTE_DEVICE_STATE_HANDLER_T
356                scic_sds_stp_remote_device_ready_substate_handler_table[];
357 extern SCIC_SDS_REMOTE_DEVICE_STATE_HANDLER_T
358                scic_sds_smp_remote_device_ready_substate_handler_table[];
359 
360 /**
361  * This macro incrments the request count for this device
362  */
363 #define scic_sds_remote_device_increment_request_count(this_device) \
364    ((this_device)->started_request_count++)
365 
366 /**
367  * This macro decrements the request count for this device.  This count
368  * will never decrment past 0.
369  */
370 #define scic_sds_remote_device_decrement_request_count(this_device) \
371    ((this_device)->started_request_count > 0 ? \
372       (this_device)->started_request_count-- : 0)
373 
374 /**
375  * This is a helper macro to return the current device request count.
376  */
377 #define scic_sds_remote_device_get_request_count(this_device) \
378    ((this_device)->started_request_count)
379 
380 /**
381  * This macro returns the owning port of this remote device obejct.
382  */
383 #define scic_sds_remote_device_get_port(this_device) \
384    ((this_device)->owning_port)
385 
386 /**
387  * This macro returns the controller object that contains this device
388  * object
389  */
390 #define scic_sds_remote_device_get_controller(this_device) \
391    scic_sds_port_get_controller(scic_sds_remote_device_get_port(this_device))
392 
393 /**
394  * This macro sets the remote device state handlers pointer and is set on
395  * entry to each device state.
396  */
397 #define scic_sds_remote_device_set_state_handlers(this_device, handlers) \
398    ((this_device)->state_handlers = (handlers))
399 
400 /**
401  * This macro returns the base sate machine object for the remote device.
402  */
403 #define scic_sds_remote_device_get_base_state_machine(this_device) \
404    (&(this_device)->parent.state_machine)
405 
406 /**
407  * This macro returns the remote device ready substate machine
408  */
409 #define scic_sds_remote_device_get_ready_substate_machine(this_device) \
410    (&(this_device)->ready_substate_machine)
411 
412 /**
413  * This macro returns the owning port of this device
414  */
415 #define scic_sds_remote_device_get_port(this_device) \
416    ((this_device)->owning_port)
417 
418 /**
419  * This macro returns the remote device sequence value
420  */
421 #define scic_sds_remote_device_get_sequence(this_device) \
422    ( \
423       scic_sds_remote_device_get_controller(this_device)->\
424          remote_device_sequence[(this_device)->rnc->remote_node_index] \
425    )
426 
427 /**
428  * This macro returns the controllers protocol engine group
429  */
430 #define scic_sds_remote_device_get_controller_peg(this_device) \
431    ( \
432       scic_sds_controller_get_protocol_engine_group( \
433          scic_sds_port_get_controller( \
434             scic_sds_remote_device_get_port(this_device) \
435          ) \
436       ) \
437    )
438 
439 /**
440  * This macro returns the port index for the devices owning port
441  */
442 #define scic_sds_remote_device_get_port_index(this_device) \
443    (scic_sds_port_get_index(scic_sds_remote_device_get_port(this_device)))
444 
445 /**
446  * This macro returns the remote node index for this device object
447  */
448 #define scic_sds_remote_device_get_index(this_device) \
449    ((this_device)->rnc->remote_node_index)
450 
451 /**
452  * This macro builds a remote device context for the SCU post request
453  * operation
454  */
455 #define scic_sds_remote_device_build_command_context(device, command) \
456    (   (command) \
457      | ((U32)(scic_sds_remote_device_get_controller_peg((device))) << SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_SHIFT)\
458      | ((U32)(scic_sds_remote_device_get_port_index((device))) << SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT) \
459      | (scic_sds_remote_device_get_index((device))) \
460    )
461 
462 /**
463  * This macro makes the working request assingment for the remote device
464  * object. To clear the working request use this macro with a NULL request
465  * object.
466  */
467 #define scic_sds_remote_device_set_working_request(device, request) \
468    ((device)->working_request = (request))
469 
470 // ---------------------------------------------------------------------------
471 
472 U32 scic_sds_remote_device_get_min_timer_count(void);
473 
474 U32 scic_sds_remote_device_get_max_timer_count(void);
475 
476 SCI_STATUS scic_sds_remote_device_frame_handler(
477    SCIC_SDS_REMOTE_DEVICE_T *this_device,
478    U32                       frame_index
479 );
480 
481 SCI_STATUS scic_sds_remote_device_event_handler(
482    SCIC_SDS_REMOTE_DEVICE_T *this_device,
483    U32                       event_code
484 );
485 
486 SCI_STATUS scic_sds_remote_device_start_io(
487    struct SCIC_SDS_CONTROLLER *controller,
488    SCIC_SDS_REMOTE_DEVICE_T   *this_device,
489    struct SCIC_SDS_REQUEST    *io_request
490 );
491 
492 SCI_STATUS scic_sds_remote_device_complete_io(
493    struct SCIC_SDS_CONTROLLER *controller,
494    SCIC_SDS_REMOTE_DEVICE_T   *this_device,
495    struct SCIC_SDS_REQUEST    *io_request
496 );
497 
498 SCI_STATUS scic_sds_remote_device_resume(
499    SCIC_SDS_REMOTE_DEVICE_T *this_device
500 );
501 
502 SCI_STATUS scic_sds_remote_device_suspend(
503    SCIC_SDS_REMOTE_DEVICE_T *this_device,
504    U32                       suspend_type
505 );
506 
507 SCI_STATUS scic_sds_remote_device_start_task(
508    struct SCIC_SDS_CONTROLLER  *controller,
509    SCIC_SDS_REMOTE_DEVICE_T    *this_device,
510    struct SCIC_SDS_REQUEST     *io_request
511 );
512 
513 void scic_sds_remote_device_post_request(
514    SCIC_SDS_REMOTE_DEVICE_T * this_device,
515    U32                        request
516 );
517 
518 #if !defined(DISABLE_ATAPI)
519 BOOL scic_sds_remote_device_is_atapi(
520    SCIC_SDS_REMOTE_DEVICE_T    *this_device
521 );
522 #else // !defined(DISABLE_ATAPI)
523 #define scic_sds_remote_device_is_atapi(this_device) FALSE
524 #endif // !defined(DISABLE_ATAPI)
525 
526 // ---------------------------------------------------------------------------
527 
528 #ifdef SCI_LOGGING
529 void scic_sds_remote_device_initialize_state_logging(
530    SCIC_SDS_REMOTE_DEVICE_T *this_device
531 );
532 
533 void scic_sds_remote_device_deinitialize_state_logging(
534    SCIC_SDS_REMOTE_DEVICE_T *this_device
535 );
536 #else // SCI_LOGGING
537 #define scic_sds_remote_device_initialize_state_logging(x)
538 #define scic_sds_remote_device_deinitialize_state_logging(x)
539 #endif // SCI_LOGGING
540 
541 // ---------------------------------------------------------------------------
542 
543 void scic_sds_remote_device_start_request(
544    SCIC_SDS_REMOTE_DEVICE_T * this_device,
545    struct SCIC_SDS_REQUEST  * the_request,
546    SCI_STATUS                 status
547 );
548 
549 void scic_sds_remote_device_continue_request(
550    SCIC_SDS_REMOTE_DEVICE_T * this_device
551 );
552 
553 SCI_STATUS scic_sds_remote_device_default_start_handler(
554    SCI_BASE_REMOTE_DEVICE_T *this_device
555 );
556 
557 SCI_STATUS scic_sds_remote_device_default_stop_handler(
558    SCI_BASE_REMOTE_DEVICE_T *this_device
559 );
560 
561 SCI_STATUS scic_sds_remote_device_default_fail_handler(
562    SCI_BASE_REMOTE_DEVICE_T *this_device
563 );
564 
565 SCI_STATUS scic_sds_remote_device_default_destruct_handler(
566    SCI_BASE_REMOTE_DEVICE_T *this_device
567 );
568 
569 SCI_STATUS scic_sds_remote_device_default_reset_handler(
570    SCI_BASE_REMOTE_DEVICE_T *device
571 );
572 
573 SCI_STATUS scic_sds_remote_device_default_reset_complete_handler(
574    SCI_BASE_REMOTE_DEVICE_T *device
575 );
576 
577 SCI_STATUS scic_sds_remote_device_default_start_request_handler(
578    SCI_BASE_REMOTE_DEVICE_T *device,
579    SCI_BASE_REQUEST_T       *request
580 );
581 
582 SCI_STATUS scic_sds_remote_device_default_complete_request_handler(
583    SCI_BASE_REMOTE_DEVICE_T *device,
584    SCI_BASE_REQUEST_T       *request
585 );
586 
587 SCI_STATUS scic_sds_remote_device_default_continue_request_handler(
588    SCI_BASE_REMOTE_DEVICE_T *device,
589    SCI_BASE_REQUEST_T       *request
590 );
591 
592 SCI_STATUS scic_sds_remote_device_default_suspend_handler(
593    SCIC_SDS_REMOTE_DEVICE_T *this_device,
594    U32                       suspend_type
595 );
596 
597 SCI_STATUS scic_sds_remote_device_default_resume_handler(
598    SCIC_SDS_REMOTE_DEVICE_T *this_device
599 );
600 
601 SCI_STATUS  scic_sds_remote_device_default_event_handler(
602    SCIC_SDS_REMOTE_DEVICE_T *this_device,
603    U32                       event_code
604 );
605 
606 SCI_STATUS scic_sds_remote_device_default_frame_handler(
607    SCIC_SDS_REMOTE_DEVICE_T *this_device,
608    U32                       frame_index
609 );
610 
611 // ---------------------------------------------------------------------------
612 
613 SCI_STATUS scic_sds_remote_device_ready_state_stop_handler(
614    SCI_BASE_REMOTE_DEVICE_T *device
615 );
616 
617 SCI_STATUS scic_sds_remote_device_ready_state_reset_handler(
618    SCI_BASE_REMOTE_DEVICE_T *device
619 );
620 
621 SCI_STATUS scic_sds_remote_device_general_frame_handler(
622    SCIC_SDS_REMOTE_DEVICE_T *this_device,
623    U32                       frame_index
624 );
625 
626 SCI_STATUS scic_sds_remote_device_general_event_handler(
627    SCIC_SDS_REMOTE_DEVICE_T *this_device,
628    U32                       event_code
629 );
630 
631 SCI_STATUS scic_sds_ssp_remote_device_ready_suspended_substate_resume_handler(
632    SCIC_SDS_REMOTE_DEVICE_T *this_device
633 );
634 
635 // ---------------------------------------------------------------------------
636 
637 void scic_sds_remote_device_get_info_from_smp_discover_response(
638    SCIC_SDS_REMOTE_DEVICE_T    * this_device,
639    SMP_RESPONSE_DISCOVER_T     * discover_response
640 );
641 
642 #ifdef __cplusplus
643 }
644 #endif // __cplusplus
645 
646 #endif // _SCIC_SDS_REMOTE_DEVICE_H_
647