xref: /freebsd/sys/dev/isci/scil/scif_sas_smp_remote_device.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1f11c7f63SJim Harris /*-
2*718cf2ccSPedro F. Giffuni  * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0
3*718cf2ccSPedro F. Giffuni  *
4f11c7f63SJim Harris  * This file is provided under a dual BSD/GPLv2 license.  When using or
5f11c7f63SJim Harris  * redistributing this file, you may do so under either license.
6f11c7f63SJim Harris  *
7f11c7f63SJim Harris  * GPL LICENSE SUMMARY
8f11c7f63SJim Harris  *
9f11c7f63SJim Harris  * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
10f11c7f63SJim Harris  *
11f11c7f63SJim Harris  * This program is free software; you can redistribute it and/or modify
12f11c7f63SJim Harris  * it under the terms of version 2 of the GNU General Public License as
13f11c7f63SJim Harris  * published by the Free Software Foundation.
14f11c7f63SJim Harris  *
15f11c7f63SJim Harris  * This program is distributed in the hope that it will be useful, but
16f11c7f63SJim Harris  * WITHOUT ANY WARRANTY; without even the implied warranty of
17f11c7f63SJim Harris  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18f11c7f63SJim Harris  * General Public License for more details.
19f11c7f63SJim Harris  *
20f11c7f63SJim Harris  * You should have received a copy of the GNU General Public License
21f11c7f63SJim Harris  * along with this program; if not, write to the Free Software
22f11c7f63SJim Harris  * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
23f11c7f63SJim Harris  * The full GNU General Public License is included in this distribution
24f11c7f63SJim Harris  * in the file called LICENSE.GPL.
25f11c7f63SJim Harris  *
26f11c7f63SJim Harris  * BSD LICENSE
27f11c7f63SJim Harris  *
28f11c7f63SJim Harris  * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
29f11c7f63SJim Harris  * All rights reserved.
30f11c7f63SJim Harris  *
31f11c7f63SJim Harris  * Redistribution and use in source and binary forms, with or without
32f11c7f63SJim Harris  * modification, are permitted provided that the following conditions
33f11c7f63SJim Harris  * are met:
34f11c7f63SJim Harris  *
35f11c7f63SJim Harris  *   * Redistributions of source code must retain the above copyright
36f11c7f63SJim Harris  *     notice, this list of conditions and the following disclaimer.
37f11c7f63SJim Harris  *   * Redistributions in binary form must reproduce the above copyright
38f11c7f63SJim Harris  *     notice, this list of conditions and the following disclaimer in
39f11c7f63SJim Harris  *     the documentation and/or other materials provided with the
40f11c7f63SJim Harris  *     distribution.
41f11c7f63SJim Harris  *
42f11c7f63SJim Harris  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
43f11c7f63SJim Harris  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
44f11c7f63SJim Harris  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
45f11c7f63SJim Harris  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
46f11c7f63SJim Harris  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
47f11c7f63SJim Harris  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
48f11c7f63SJim Harris  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
49f11c7f63SJim Harris  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
50f11c7f63SJim Harris  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51f11c7f63SJim Harris  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
52f11c7f63SJim Harris  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53f11c7f63SJim Harris  */
54f11c7f63SJim Harris #ifndef _SCIF_SAS_SMP_REMOTE_DEVICE_H_
55f11c7f63SJim Harris #define _SCIF_SAS_SMP_REMOTE_DEVICE_H_
56f11c7f63SJim Harris 
57f11c7f63SJim Harris #ifdef __cplusplus
58f11c7f63SJim Harris extern "C" {
59f11c7f63SJim Harris #endif // __cplusplus
60f11c7f63SJim Harris 
61f11c7f63SJim Harris 
62f11c7f63SJim Harris #include <dev/isci/scil/sci_fast_list.h>
63f11c7f63SJim Harris #include <dev/isci/scil/scif_sas_smp_phy.h>
64f11c7f63SJim Harris 
65f11c7f63SJim Harris /**
66f11c7f63SJim Harris  * @file
67f11c7f63SJim Harris  *
68f11c7f63SJim Harris  * @brief This file contains the protected interface structures, constants,
69f11c7f63SJim Harris  *        and methods for the SCIF_SAS_SMP_REMOTE_DEVICE object.
70f11c7f63SJim Harris  */
71f11c7f63SJim Harris 
72f11c7f63SJim Harris struct SCIF_SAS_CONTROLLER;
73f11c7f63SJim Harris struct SCIF_SAS_REMOTE_DEVICE;
74f11c7f63SJim Harris struct SCIF_SAS_INTERNAL_IO_REQUEST;
75f11c7f63SJim Harris struct SCIF_SAS_REQUEST;
76f11c7f63SJim Harris struct SCIF_SAS_SMP_PHY;
77f11c7f63SJim Harris 
78f11c7f63SJim Harris #define SMP_REQUEST_RETRY_WAIT_DURATION   20
79f11c7f63SJim Harris #define SMP_SPINUP_HOLD_RELEASE_WAIT_DURATION 100
80f11c7f63SJim Harris 
81f11c7f63SJim Harris /**
82f11c7f63SJim Harris  * @name SCIF_SAS_SMP_REMOTE_DEVICE_ACTIVITY_CODES
83f11c7f63SJim Harris  *
84f11c7f63SJim Harris  * These constants depict the various SMP remote device activities.
85f11c7f63SJim Harris  */
86f11c7f63SJim Harris /*@{*/
87f11c7f63SJim Harris #define NOT_IN_SMP_ACTIVITY 0xff
88f11c7f63SJim Harris #define SCIF_SAS_SMP_REMOTE_DEVICE_ACTIVITY_NONE         0x0
89f11c7f63SJim Harris #define SCIF_SAS_SMP_REMOTE_DEVICE_ACTIVITY_DISCOVER     0x1
90f11c7f63SJim Harris #define SCIF_SAS_SMP_REMOTE_DEVICE_ACTIVITY_TARGET_RESET 0x2
91f11c7f63SJim Harris #define SCIF_SAS_SMP_REMOTE_DEVICE_ACTIVITY_SATA_SPINUP_HOLD_RELEASE 0x3
92f11c7f63SJim Harris #define SCIF_SAS_SMP_REMOTE_DEVICE_ACTIVITY_CONFIG_ROUTE_TABLE 0x4
93f11c7f63SJim Harris #define SCIF_SAS_SMP_REMOTE_DEVICE_ACTIVITY_CLEAN_ROUTE_TABLE 0x5
94f11c7f63SJim Harris #define SCIF_SAS_SMP_REMOTE_DEVICE_ACTIVITY_CLEAR_AFFILIATION 0x6
95f11c7f63SJim Harris /*@}*/
96f11c7f63SJim Harris 
97f11c7f63SJim Harris 
98f11c7f63SJim Harris 
99f11c7f63SJim Harris /**
100f11c7f63SJim Harris  * @name SCIF_SAS_CONFIG_ROUTE_TABLE_OPTION_CODES
101f11c7f63SJim Harris  *
102f11c7f63SJim Harris  * These constants depict the various configure route table options.
103f11c7f63SJim Harris  */
104f11c7f63SJim Harris /*@{*/
105f11c7f63SJim Harris #define SCIF_SAS_CONFIG_ROUTE_TABLE_LOWEST_PHY_ONLY   0
106f11c7f63SJim Harris #define SCIF_SAS_CONFIG_ROUTE_TABLE_MIDDLE_PHY_ONLY   1
107f11c7f63SJim Harris #define SCIF_SAS_CONFIG_ROUTE_TABLE_HIGHEST_PHY_ONLY  2
108f11c7f63SJim Harris #define SCIF_SAS_CONFIG_ROUTE_TABLE_ALL_PHYS          3
109f11c7f63SJim Harris /*@}*/
110f11c7f63SJim Harris 
111f11c7f63SJim Harris /**
112f11c7f63SJim Harris  * @struct SCIF_SAS_SMP_REMOTE_DEVICE
113f11c7f63SJim Harris  *
114f11c7f63SJim Harris  * @brief The SCIF_SAS_SMP_REMOTE_DEVICE stores data for smp remote devices
115f11c7f63SJim Harris  *        (expanders) discovering attached targets.
116f11c7f63SJim Harris  *
117f11c7f63SJim Harris  */
118f11c7f63SJim Harris typedef struct SCIF_SAS_SMP_REMOTE_DEVICE
119f11c7f63SJim Harris {
120f11c7f63SJim Harris    /**
121f11c7f63SJim Harris     * This field stores the current SMP request function in the discovering
122f11c7f63SJim Harris     * sequence.
123f11c7f63SJim Harris     */
124f11c7f63SJim Harris    U32 current_smp_request;
125f11c7f63SJim Harris 
126f11c7f63SJim Harris    /**
127f11c7f63SJim Harris     * This field indicates a smp device is either in the middle of normal discover
128f11c7f63SJim Harris     * process or in the middle of resetting a expander attahced remote device.
129f11c7f63SJim Harris     */
130f11c7f63SJim Harris    U8 current_activity;
131f11c7f63SJim Harris 
132f11c7f63SJim Harris    /**
133f11c7f63SJim Harris     * This field stores the current expander phy index for sending out SMP
134f11c7f63SJim Harris     * DISCOVER request.
135f11c7f63SJim Harris     */
136f11c7f63SJim Harris    U8 current_activity_phy_index;
137f11c7f63SJim Harris 
138f11c7f63SJim Harris    /**
139f11c7f63SJim Harris     * This field stores the current route index to config route table for
140f11c7f63SJim Harris     * a phy.
141f11c7f63SJim Harris     */
142f11c7f63SJim Harris    U16 curr_config_route_index;
143f11c7f63SJim Harris 
144f11c7f63SJim Harris    /**
145f11c7f63SJim Harris     * This field indicates whether a route table of an expander has been cleaned
146f11c7f63SJim Harris     * since a DISCOVER process starts.
147f11c7f63SJim Harris     */
148f11c7f63SJim Harris    BOOL is_route_table_cleaned;
149f11c7f63SJim Harris 
150f11c7f63SJim Harris    /**
151f11c7f63SJim Harris     * This field stores the smp phy whose route entries are edited by sending
152f11c7f63SJim Harris     * CONFIG ROUTE INFO commands.
153f11c7f63SJim Harris     */
154f11c7f63SJim Harris    struct SCIF_SAS_SMP_PHY * config_route_smp_phy_anchor;
155f11c7f63SJim Harris 
156f11c7f63SJim Harris    /*
157f11c7f63SJim Harris     * This field stores the current smp phy on a destination device's smp phy list whose
158f11c7f63SJim Harris     * attached device's sas address is to be edited into this smp device's route table.
159f11c7f63SJim Harris     * When one config route info response is processed, we can find the next smp phy to edit
160f11c7f63SJim Harris     * using this field's value.
161f11c7f63SJim Harris     */
162f11c7f63SJim Harris    struct SCIF_SAS_SMP_PHY * curr_config_route_destination_smp_phy;
163f11c7f63SJim Harris 
164f11c7f63SJim Harris    /*
165f11c7f63SJim Harris     * This field stores the current smp phy to which a PHY CONTROL (clear affiliation)
166f11c7f63SJim Harris     * command is sent out.
167f11c7f63SJim Harris     */
168f11c7f63SJim Harris    struct SCIF_SAS_SMP_PHY * curr_clear_affiliation_phy;
169f11c7f63SJim Harris 
170f11c7f63SJim Harris    /**
171f11c7f63SJim Harris     * This field is to indicate a smp activity for this smp device is
172f11c7f63SJim Harris     * to be started (not yet). The scheduled activity could be Discover or Config
173f11c7f63SJim Harris     * Route Table.
174f11c7f63SJim Harris     */
175f11c7f63SJim Harris    U8 scheduled_activity;
176f11c7f63SJim Harris 
177f11c7f63SJim Harris    /**
178f11c7f63SJim Harris     * This timer is used for waiting before retrying a smp request, or before
179f11c7f63SJim Harris     * sending Discover request after Phy Control during Target Reset.
180f11c7f63SJim Harris     */
181f11c7f63SJim Harris    void * smp_activity_timer;
182f11c7f63SJim Harris 
183f11c7f63SJim Harris    /**
184f11c7f63SJim Harris     * This field save the retry count for internal smp request. Since when
185f11c7f63SJim Harris     * an internal smp request gets retried, it has been destructed already.
186f11c7f63SJim Harris     */
187f11c7f63SJim Harris    U8 io_retry_count;
188f11c7f63SJim Harris 
189f11c7f63SJim Harris    /**
190f11c7f63SJim Harris     * This field stores the number of phys for expander device found by decoding
191f11c7f63SJim Harris     * the SMP REPORT GENERAL response.
192f11c7f63SJim Harris     */
193f11c7f63SJim Harris    U8  number_of_phys;
194f11c7f63SJim Harris 
195f11c7f63SJim Harris    /**
196f11c7f63SJim Harris     * This field indicates the maximum number of expander route indexes per phy for
197f11c7f63SJim Harris     * this expander device.
198f11c7f63SJim Harris     */
199f11c7f63SJim Harris    U16 expander_route_indexes;
200f11c7f63SJim Harris 
201f11c7f63SJim Harris    /**
202f11c7f63SJim Harris     * This field indicates whether an expander device supports table-to-table
203f11c7f63SJim Harris     * connection.
204f11c7f63SJim Harris     */
205f11c7f63SJim Harris    BOOL is_table_to_table_supported;
206f11c7f63SJim Harris 
207f11c7f63SJim Harris    /**
208f11c7f63SJim Harris     * This field indicates whether an expander device is externally configurable.
209f11c7f63SJim Harris     * If it is, it is not self-configuring and is not able to config others.
210f11c7f63SJim Harris     */
211f11c7f63SJim Harris    BOOL is_externally_configurable;
212f11c7f63SJim Harris 
213f11c7f63SJim Harris    /**
214f11c7f63SJim Harris     * This field indicates whether an expander device is able to config others.
215f11c7f63SJim Harris     */
216f11c7f63SJim Harris    BOOL is_able_to_config_others;
217f11c7f63SJim Harris 
218f11c7f63SJim Harris    /**
219f11c7f63SJim Harris     * This field contains the list of all smp phys that connect to another smp phy.
220f11c7f63SJim Harris     */
221f11c7f63SJim Harris    SCI_FAST_LIST_T smp_phy_list;
222f11c7f63SJim Harris 
223f11c7f63SJim Harris }SCIF_SAS_SMP_REMOTE_DEVICE_T;
224f11c7f63SJim Harris 
225f11c7f63SJim Harris void scif_sas_smp_remote_device_clear(
226f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
227f11c7f63SJim Harris );
228f11c7f63SJim Harris 
229f11c7f63SJim Harris void scif_sas_smp_remote_device_construct(
230f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
231f11c7f63SJim Harris );
232f11c7f63SJim Harris 
233f11c7f63SJim Harris SCI_STATUS scif_sas_smp_remote_device_decode_smp_response(
234f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
235f11c7f63SJim Harris    struct SCIF_SAS_REQUEST       * fw_request,
236f11c7f63SJim Harris    void                          * response_data,
237f11c7f63SJim Harris    SCI_IO_STATUS                   completion_status
238f11c7f63SJim Harris );
239f11c7f63SJim Harris 
240f11c7f63SJim Harris SCI_STATUS scif_sas_smp_remote_device_decode_report_general_response(
241f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
242f11c7f63SJim Harris    SMP_RESPONSE_T                * smp_response
243f11c7f63SJim Harris );
244f11c7f63SJim Harris 
245f11c7f63SJim Harris SCI_STATUS scif_sas_smp_remote_device_decode_initial_discover_response(
246f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
247f11c7f63SJim Harris    SMP_RESPONSE_T                * smp_response
248f11c7f63SJim Harris );
249f11c7f63SJim Harris 
250f11c7f63SJim Harris SCI_STATUS scif_sas_smp_remote_device_decode_report_phy_sata_response(
251f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
252f11c7f63SJim Harris    SMP_RESPONSE_T                * smp_response
253f11c7f63SJim Harris );
254f11c7f63SJim Harris 
255f11c7f63SJim Harris SCI_STATUS scif_sas_smp_remote_device_decode_target_reset_phy_control_response(
256f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
257f11c7f63SJim Harris    SMP_RESPONSE_T           * smp_response
258f11c7f63SJim Harris );
259f11c7f63SJim Harris 
260f11c7f63SJim Harris SCI_STATUS scif_sas_smp_remote_device_decode_discover_phy_control_response(
261f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
262f11c7f63SJim Harris    SMP_RESPONSE_T           * smp_response
263f11c7f63SJim Harris );
264f11c7f63SJim Harris 
265f11c7f63SJim Harris SCI_STATUS scif_sas_smp_remote_device_decode_target_reset_discover_response(
266f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
267f11c7f63SJim Harris    SMP_RESPONSE_T           * smp_response
268f11c7f63SJim Harris );
269f11c7f63SJim Harris 
270f11c7f63SJim Harris SCI_STATUS scif_sas_smp_remote_device_decode_spinup_hold_release_discover_response(
271f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
272f11c7f63SJim Harris    SMP_RESPONSE_T           * smp_response
273f11c7f63SJim Harris );
274f11c7f63SJim Harris 
275f11c7f63SJim Harris SCI_STATUS scif_sas_smp_remote_device_decode_config_route_info_response(
276f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
277f11c7f63SJim Harris    SMP_RESPONSE_T           * smp_response
278f11c7f63SJim Harris );
279f11c7f63SJim Harris 
280f11c7f63SJim Harris void scif_sas_smp_remote_device_start_discover(
281f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
282f11c7f63SJim Harris );
283f11c7f63SJim Harris 
284f11c7f63SJim Harris void scif_sas_smp_remote_device_continue_discover(
285f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
286f11c7f63SJim Harris );
287f11c7f63SJim Harris 
288f11c7f63SJim Harris void scif_sas_smp_remote_device_finish_initial_discover(
289f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
290f11c7f63SJim Harris );
291f11c7f63SJim Harris 
292f11c7f63SJim Harris void scif_sas_smp_remote_device_finish_discover(
293f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
294f11c7f63SJim Harris );
295f11c7f63SJim Harris 
296f11c7f63SJim Harris void scif_sas_smp_remote_device_continue_target_reset(
297f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
298f11c7f63SJim Harris    struct SCIF_SAS_REQUEST       * fw_request
299f11c7f63SJim Harris );
300f11c7f63SJim Harris 
301f11c7f63SJim Harris void scif_sas_smp_remote_device_fail_discover(
302f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
303f11c7f63SJim Harris );
304f11c7f63SJim Harris 
305f11c7f63SJim Harris void scif_sas_smp_remote_device_fail_target_reset(
306f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
307f11c7f63SJim Harris    struct SCIF_SAS_REQUEST       * fw_request
308f11c7f63SJim Harris );
309f11c7f63SJim Harris 
310f11c7f63SJim Harris void scif_sas_smp_remote_device_continue_current_activity(
311f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
312f11c7f63SJim Harris    struct SCIF_SAS_REQUEST       * fw_request,
313f11c7f63SJim Harris    SCI_STATUS                      status
314f11c7f63SJim Harris );
315f11c7f63SJim Harris 
316f11c7f63SJim Harris void scif_sas_smp_remote_device_target_reset_poll(
317f11c7f63SJim Harris    struct SCIF_SAS_REQUEST       * fw_request
318f11c7f63SJim Harris );
319f11c7f63SJim Harris 
320f11c7f63SJim Harris void scif_sas_smp_remote_device_sata_spinup_hold_release(
321f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
322f11c7f63SJim Harris );
323f11c7f63SJim Harris 
324f11c7f63SJim Harris void scif_sas_smp_remote_device_fail_target_spinup_hold_release(
325f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
326f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * target_device
327f11c7f63SJim Harris );
328f11c7f63SJim Harris 
329f11c7f63SJim Harris void scif_sas_smp_remote_device_retry_internal_io(
330f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
331f11c7f63SJim Harris    U8                         io_retry_count,
332f11c7f63SJim Harris    U32                        delay
333f11c7f63SJim Harris );
334f11c7f63SJim Harris 
335f11c7f63SJim Harris BOOL scif_sas_smp_remote_device_is_in_activity(
336f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
337f11c7f63SJim Harris );
338f11c7f63SJim Harris 
339f11c7f63SJim Harris SCIF_SAS_SMP_PHY_T * scif_sas_smp_remote_device_find_smp_phy_by_id(
340f11c7f63SJim Harris    U8                                  phy_identifier,
341f11c7f63SJim Harris    struct SCIF_SAS_SMP_REMOTE_DEVICE * smp_remote_device
342f11c7f63SJim Harris );
343f11c7f63SJim Harris 
344f11c7f63SJim Harris void scif_sas_smp_remote_device_removed(
345f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * this_device
346f11c7f63SJim Harris );
347f11c7f63SJim Harris 
348f11c7f63SJim Harris void scif_sas_smp_remote_device_terminated_request_handler(
349f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
350f11c7f63SJim Harris    struct SCIF_SAS_REQUEST       * fw_request
351f11c7f63SJim Harris );
352f11c7f63SJim Harris 
353f11c7f63SJim Harris void scif_sas_smp_remote_device_populate_smp_phy_list(
354f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
355f11c7f63SJim Harris );
356f11c7f63SJim Harris 
357f11c7f63SJim Harris SCI_STATUS scif_sas_smp_remote_device_save_smp_phy_info(
358f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device,
359f11c7f63SJim Harris    SMP_RESPONSE_DISCOVER_T       * discover_response
360f11c7f63SJim Harris );
361f11c7f63SJim Harris 
362f11c7f63SJim Harris #ifdef SCI_SMP_PHY_LIST_DEBUG_PRINT
363f11c7f63SJim Harris void scif_sas_smp_remote_device_print_smp_phy_list(
364f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
365f11c7f63SJim Harris );
366f11c7f63SJim Harris #endif
367f11c7f63SJim Harris 
368f11c7f63SJim Harris void scif_sas_smp_remote_device_configure_upstream_expander_route_info(
369f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * this_device
370f11c7f63SJim Harris );
371f11c7f63SJim Harris 
372f11c7f63SJim Harris struct SCIF_SAS_REMOTE_DEVICE * scif_sas_remote_device_find_upstream_expander(
373f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * this_device
374f11c7f63SJim Harris );
375f11c7f63SJim Harris 
376f11c7f63SJim Harris struct SCIF_SAS_REMOTE_DEVICE * scif_sas_remote_device_find_downstream_expander(
377f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * this_device
378f11c7f63SJim Harris );
379f11c7f63SJim Harris 
380f11c7f63SJim Harris BOOL scif_sas_smp_remote_device_do_config_route_info(
381f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * device_being_config,
382f11c7f63SJim Harris    struct SCIF_SAS_SMP_PHY       * destination_smp_phy
383f11c7f63SJim Harris );
384f11c7f63SJim Harris 
385f11c7f63SJim Harris void scif_sas_smp_remote_device_configure_route_table(
386f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * device_being_config
387f11c7f63SJim Harris );
388f11c7f63SJim Harris 
389f11c7f63SJim Harris void scif_sas_smp_remote_device_clean_route_table(
390f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
391f11c7f63SJim Harris );
392f11c7f63SJim Harris 
393f11c7f63SJim Harris void scif_sas_smp_remote_device_clean_route_table_entry(
394f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
395f11c7f63SJim Harris );
396f11c7f63SJim Harris 
397f11c7f63SJim Harris void scif_sas_smp_remote_device_cancel_config_route_table_activity(
398f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
399f11c7f63SJim Harris );
400f11c7f63SJim Harris 
401f11c7f63SJim Harris void scif_sas_smp_remote_device_cancel_smp_activity(
402f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
403f11c7f63SJim Harris );
404f11c7f63SJim Harris 
405f11c7f63SJim Harris U8 scif_sas_smp_remote_device_get_config_route_table_method(
406f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
407f11c7f63SJim Harris );
408f11c7f63SJim Harris 
409f11c7f63SJim Harris void scif_sas_smp_remote_device_start_clear_affiliation(
410f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
411f11c7f63SJim Harris );
412f11c7f63SJim Harris 
413f11c7f63SJim Harris void scif_sas_smp_remote_device_continue_clear_affiliation(
414f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
415f11c7f63SJim Harris );
416f11c7f63SJim Harris 
417f11c7f63SJim Harris void scif_sas_smp_remote_device_finish_clear_affiliation(
418f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * fw_device
419f11c7f63SJim Harris );
420f11c7f63SJim Harris 
421f11c7f63SJim Harris void scif_sas_smp_remote_device_start_target_reset(
422f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * expander_device,
423f11c7f63SJim Harris    struct SCIF_SAS_REMOTE_DEVICE * target_device,
424f11c7f63SJim Harris    struct SCIF_SAS_REQUEST       * fw_request
425f11c7f63SJim Harris );
426f11c7f63SJim Harris 
427f11c7f63SJim Harris #ifdef __cplusplus
428f11c7f63SJim Harris }
429f11c7f63SJim Harris #endif // __cplusplus
430f11c7f63SJim Harris 
431f11c7f63SJim Harris #endif // _SCIF_SAS_SMP_REMOTE_DEVICE_H_
432