xref: /freebsd/sys/dev/isci/scil/scic_sds_smp_remote_device.c (revision 685dc743dc3b5645e34836464128e1c0558b404b)
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 
55f11c7f63SJim Harris #include <sys/cdefs.h>
56f11c7f63SJim Harris /**
57f11c7f63SJim Harris  * @file
58f11c7f63SJim Harris  *
59f11c7f63SJim Harris  * @brief This file contains This file contains the SMP remote device
60f11c7f63SJim Harris  *        object methods and it's state machines.
61f11c7f63SJim Harris  */
62f11c7f63SJim Harris 
63f11c7f63SJim Harris #include <dev/isci/scil/scic_user_callback.h>
64f11c7f63SJim Harris #include <dev/isci/scil/scic_sds_logger.h>
65f11c7f63SJim Harris #include <dev/isci/scil/scic_sds_remote_device.h>
66f11c7f63SJim Harris #include <dev/isci/scil/scic_sds_controller.h>
67f11c7f63SJim Harris #include <dev/isci/scil/scic_sds_port.h>
68f11c7f63SJim Harris #include <dev/isci/scil/scic_sds_request.h>
69f11c7f63SJim Harris #include <dev/isci/scil/scu_event_codes.h>
70f11c7f63SJim Harris #include <dev/isci/scil/scu_task_context.h>
71f11c7f63SJim Harris #include <dev/isci/scil/scic_remote_device.h>
72f11c7f63SJim Harris 
73f11c7f63SJim Harris //*****************************************************************************
74f11c7f63SJim Harris //*  SMP REMOTE DEVICE READY IDLE SUBSTATE HANDLERS
75f11c7f63SJim Harris //*****************************************************************************
76f11c7f63SJim Harris 
77f11c7f63SJim Harris /**
78f11c7f63SJim Harris  * This method will handle the start io operation for a SMP device that is in
79f11c7f63SJim Harris  * the idle state.
80f11c7f63SJim Harris  *
81f11c7f63SJim Harris  * @param [in] device The device the io is sent to.
82f11c7f63SJim Harris  * @param [in] request The io to start.
83f11c7f63SJim Harris  *
84f11c7f63SJim Harris  * @return SCI_STATUS
85f11c7f63SJim Harris  */
86f11c7f63SJim Harris static
scic_sds_smp_remote_device_ready_idle_substate_start_io_handler(SCI_BASE_REMOTE_DEVICE_T * device,SCI_BASE_REQUEST_T * request)87f11c7f63SJim Harris SCI_STATUS scic_sds_smp_remote_device_ready_idle_substate_start_io_handler(
88f11c7f63SJim Harris    SCI_BASE_REMOTE_DEVICE_T * device,
89f11c7f63SJim Harris    SCI_BASE_REQUEST_T       * request
90f11c7f63SJim Harris )
91f11c7f63SJim Harris {
92f11c7f63SJim Harris    SCI_STATUS status;
93f11c7f63SJim Harris    SCIC_SDS_REMOTE_DEVICE_T * this_device = (SCIC_SDS_REMOTE_DEVICE_T *)device;
94f11c7f63SJim Harris    SCIC_SDS_REQUEST_T       * io_request  = (SCIC_SDS_REQUEST_T       *)request;
95f11c7f63SJim Harris 
96f11c7f63SJim Harris    // Will the port allow the io request to start?
97f11c7f63SJim Harris    status = this_device->owning_port->state_handlers->start_io_handler(
98f11c7f63SJim Harris       this_device->owning_port,
99f11c7f63SJim Harris       this_device,
100f11c7f63SJim Harris       io_request
101f11c7f63SJim Harris    );
102f11c7f63SJim Harris 
103f11c7f63SJim Harris    if (status == SCI_SUCCESS)
104f11c7f63SJim Harris    {
105f11c7f63SJim Harris       status =
106f11c7f63SJim Harris          scic_sds_remote_node_context_start_io(this_device->rnc, io_request);
107f11c7f63SJim Harris 
108f11c7f63SJim Harris       if (status == SCI_SUCCESS)
109f11c7f63SJim Harris       {
110f11c7f63SJim Harris          status = scic_sds_request_start(io_request);
111f11c7f63SJim Harris       }
112f11c7f63SJim Harris 
113f11c7f63SJim Harris       if (status == SCI_SUCCESS)
114f11c7f63SJim Harris       {
115f11c7f63SJim Harris          this_device->working_request = io_request;
116f11c7f63SJim Harris 
117f11c7f63SJim Harris          sci_base_state_machine_change_state(
118f11c7f63SJim Harris                &this_device->ready_substate_machine,
119f11c7f63SJim Harris                SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD
120f11c7f63SJim Harris          );
121f11c7f63SJim Harris       }
122f11c7f63SJim Harris 
123f11c7f63SJim Harris       scic_sds_remote_device_start_request(this_device, io_request, status);
124f11c7f63SJim Harris    }
125f11c7f63SJim Harris 
126f11c7f63SJim Harris    return status;
127f11c7f63SJim Harris }
128f11c7f63SJim Harris 
129f11c7f63SJim Harris 
130f11c7f63SJim Harris //******************************************************************************
131f11c7f63SJim Harris //* SMP REMOTE DEVICE READY SUBSTATE CMD HANDLERS
132f11c7f63SJim Harris //******************************************************************************
133f11c7f63SJim Harris /**
134f11c7f63SJim Harris  * This device is already handling a command it can not accept new commands
135f11c7f63SJim Harris  * until this one is complete.
136f11c7f63SJim Harris  *
137f11c7f63SJim Harris  * @param[in] device This is the device object that is receiving the IO.
138f11c7f63SJim Harris  *
139f11c7f63SJim Harris  * @param[in] request The io to start.
140f11c7f63SJim Harris  *
141f11c7f63SJim Harris  * @return SCI_STATUS
142f11c7f63SJim Harris  */
143f11c7f63SJim Harris static
scic_sds_smp_remote_device_ready_cmd_substate_start_io_handler(SCI_BASE_REMOTE_DEVICE_T * device,SCI_BASE_REQUEST_T * request)144f11c7f63SJim Harris SCI_STATUS scic_sds_smp_remote_device_ready_cmd_substate_start_io_handler(
145f11c7f63SJim Harris    SCI_BASE_REMOTE_DEVICE_T * device,
146f11c7f63SJim Harris    SCI_BASE_REQUEST_T       * request
147f11c7f63SJim Harris )
148f11c7f63SJim Harris {
149f11c7f63SJim Harris    return SCI_FAILURE_INVALID_STATE;
150f11c7f63SJim Harris }
151f11c7f63SJim Harris 
152f11c7f63SJim Harris 
153f11c7f63SJim Harris /**
154f11c7f63SJim Harris  * @brief this is the complete_io_handler for smp device at ready cmd substate.
155f11c7f63SJim Harris  *
156f11c7f63SJim Harris  * @param[in] device This is the device object that is receiving the IO.
157f11c7f63SJim Harris  * @param[in] request The io to start.
158f11c7f63SJim Harris  *
159f11c7f63SJim Harris  * @return SCI_STATUS
160f11c7f63SJim Harris  */
161f11c7f63SJim Harris static
scic_sds_smp_remote_device_ready_cmd_substate_complete_io_handler(SCI_BASE_REMOTE_DEVICE_T * device,SCI_BASE_REQUEST_T * request)162f11c7f63SJim Harris SCI_STATUS scic_sds_smp_remote_device_ready_cmd_substate_complete_io_handler(
163f11c7f63SJim Harris    SCI_BASE_REMOTE_DEVICE_T * device,
164f11c7f63SJim Harris    SCI_BASE_REQUEST_T       * request
165f11c7f63SJim Harris )
166f11c7f63SJim Harris {
167f11c7f63SJim Harris    SCI_STATUS                 status;
168f11c7f63SJim Harris    SCIC_SDS_REMOTE_DEVICE_T * this_device;
169f11c7f63SJim Harris    SCIC_SDS_REQUEST_T       * the_request;
170f11c7f63SJim Harris 
171f11c7f63SJim Harris    this_device = (SCIC_SDS_REMOTE_DEVICE_T *)device;
172f11c7f63SJim Harris    the_request = (SCIC_SDS_REQUEST_T       *)request;
173f11c7f63SJim Harris 
174f11c7f63SJim Harris    status = scic_sds_io_request_complete(the_request);
175f11c7f63SJim Harris 
176f11c7f63SJim Harris    if (status == SCI_SUCCESS)
177f11c7f63SJim Harris    {
178f11c7f63SJim Harris       status = scic_sds_port_complete_io(
179f11c7f63SJim Harris          this_device->owning_port, this_device, the_request);
180f11c7f63SJim Harris 
181f11c7f63SJim Harris       if (status == SCI_SUCCESS)
182f11c7f63SJim Harris       {
183f11c7f63SJim Harris        scic_sds_remote_device_decrement_request_count(this_device);
184f11c7f63SJim Harris          sci_base_state_machine_change_state(
185f11c7f63SJim Harris             &this_device->ready_substate_machine,
186f11c7f63SJim Harris             SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE
187f11c7f63SJim Harris          );
188f11c7f63SJim Harris       }
189f11c7f63SJim Harris       else
190f11c7f63SJim Harris       {
191f11c7f63SJim Harris          SCIC_LOG_ERROR((
192f11c7f63SJim Harris             sci_base_object_get_logger(this_device),
193f11c7f63SJim Harris             SCIC_LOG_OBJECT_SMP_REMOTE_TARGET,
194f11c7f63SJim Harris             "SCIC SDS Remote Device 0x%x io request 0x%x could not be completd on the port 0x%x failed with status %d.\n",
195f11c7f63SJim Harris             this_device, the_request, this_device->owning_port, status
196f11c7f63SJim Harris          ));
197f11c7f63SJim Harris       }
198f11c7f63SJim Harris    }
199f11c7f63SJim Harris 
200f11c7f63SJim Harris    return status;
201f11c7f63SJim Harris }
202f11c7f63SJim Harris 
203f11c7f63SJim Harris /**
204f11c7f63SJim Harris  * @brief This is frame handler for smp device ready cmd substate.
205f11c7f63SJim Harris  *
206f11c7f63SJim Harris  * @param[in] this_device This is the device object that is receiving the frame.
207f11c7f63SJim Harris  * @param[in] frame_index The index for the frame received.
208f11c7f63SJim Harris  *
209f11c7f63SJim Harris  * @return SCI_STATUS
210f11c7f63SJim Harris  */
211f11c7f63SJim Harris static
scic_sds_smp_remote_device_ready_cmd_substate_frame_handler(SCIC_SDS_REMOTE_DEVICE_T * this_device,U32 frame_index)212f11c7f63SJim Harris SCI_STATUS scic_sds_smp_remote_device_ready_cmd_substate_frame_handler(
213f11c7f63SJim Harris    SCIC_SDS_REMOTE_DEVICE_T * this_device,
214f11c7f63SJim Harris    U32                        frame_index
215f11c7f63SJim Harris )
216f11c7f63SJim Harris {
217f11c7f63SJim Harris    SCI_STATUS status;
218f11c7f63SJim Harris 
219f11c7f63SJim Harris    /// The device does not process any UF received from the hardware while
220f11c7f63SJim Harris    /// in this state.  All unsolicited frames are forwarded to the io request
221f11c7f63SJim Harris    /// object.
222f11c7f63SJim Harris    status = scic_sds_io_request_frame_handler(
223f11c7f63SJim Harris       this_device->working_request,
224f11c7f63SJim Harris       frame_index
225f11c7f63SJim Harris    );
226f11c7f63SJim Harris 
227f11c7f63SJim Harris    return status;
228f11c7f63SJim Harris }
229f11c7f63SJim Harris 
230f11c7f63SJim Harris // ---------------------------------------------------------------------------
231f11c7f63SJim Harris 
232f11c7f63SJim Harris SCIC_SDS_REMOTE_DEVICE_STATE_HANDLER_T
233f11c7f63SJim Harris    scic_sds_smp_remote_device_ready_substate_handler_table[
234f11c7f63SJim Harris                               SCIC_SDS_SMP_REMOTE_DEVICE_READY_MAX_SUBSTATES] =
235f11c7f63SJim Harris {
236f11c7f63SJim Harris    // SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE
237f11c7f63SJim Harris    {
238f11c7f63SJim Harris       {
239f11c7f63SJim Harris          scic_sds_remote_device_default_start_handler,
240f11c7f63SJim Harris          scic_sds_remote_device_ready_state_stop_handler,
241f11c7f63SJim Harris          scic_sds_remote_device_default_fail_handler,
242f11c7f63SJim Harris          scic_sds_remote_device_default_destruct_handler,
243f11c7f63SJim Harris          scic_sds_remote_device_default_reset_handler,
244f11c7f63SJim Harris          scic_sds_remote_device_default_reset_complete_handler,
245f11c7f63SJim Harris          scic_sds_smp_remote_device_ready_idle_substate_start_io_handler,
246f11c7f63SJim Harris          scic_sds_remote_device_default_complete_request_handler,
247f11c7f63SJim Harris          scic_sds_remote_device_default_continue_request_handler,
248f11c7f63SJim Harris          scic_sds_remote_device_default_start_request_handler,
249f11c7f63SJim Harris          scic_sds_remote_device_default_complete_request_handler
250f11c7f63SJim Harris       },
251f11c7f63SJim Harris       scic_sds_remote_device_default_suspend_handler,
252f11c7f63SJim Harris       scic_sds_remote_device_default_resume_handler,
253f11c7f63SJim Harris       scic_sds_remote_device_general_event_handler,
254f11c7f63SJim Harris       scic_sds_remote_device_default_frame_handler
255f11c7f63SJim Harris    },
256f11c7f63SJim Harris    // SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD
257f11c7f63SJim Harris    {
258f11c7f63SJim Harris       {
259f11c7f63SJim Harris          scic_sds_remote_device_default_start_handler,
260f11c7f63SJim Harris          scic_sds_remote_device_ready_state_stop_handler,
261f11c7f63SJim Harris          scic_sds_remote_device_default_fail_handler,
262f11c7f63SJim Harris          scic_sds_remote_device_default_destruct_handler,
263f11c7f63SJim Harris          scic_sds_remote_device_default_reset_handler,
264f11c7f63SJim Harris          scic_sds_remote_device_default_reset_complete_handler,
265f11c7f63SJim Harris          scic_sds_smp_remote_device_ready_cmd_substate_start_io_handler,
266f11c7f63SJim Harris          scic_sds_smp_remote_device_ready_cmd_substate_complete_io_handler,
267f11c7f63SJim Harris          scic_sds_remote_device_default_continue_request_handler,
268f11c7f63SJim Harris          scic_sds_remote_device_default_start_request_handler,
269f11c7f63SJim Harris          scic_sds_remote_device_default_complete_request_handler
270f11c7f63SJim Harris       },
271f11c7f63SJim Harris       scic_sds_remote_device_default_suspend_handler,
272f11c7f63SJim Harris       scic_sds_remote_device_default_resume_handler,
273f11c7f63SJim Harris       scic_sds_remote_device_general_event_handler,
274f11c7f63SJim Harris       scic_sds_smp_remote_device_ready_cmd_substate_frame_handler
275f11c7f63SJim Harris    }
276f11c7f63SJim Harris };
277f11c7f63SJim Harris 
278f11c7f63SJim Harris /**
279f11c7f63SJim Harris  * This is the SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE enter method. This
280f11c7f63SJim Harris  * method sets the ready cmd substate handlers and reports the device as ready.
281f11c7f63SJim Harris  *
282f11c7f63SJim Harris  * @param[in] object This is the SCI_BASE_OBJECT which is cast into a
283f11c7f63SJim Harris  *       SCIC_SDS_REMOTE_DEVICE.
284f11c7f63SJim Harris  *
285f11c7f63SJim Harris  * @return none
286f11c7f63SJim Harris  */
287f11c7f63SJim Harris static
scic_sds_smp_remote_device_ready_idle_substate_enter(SCI_BASE_OBJECT_T * object)288f11c7f63SJim Harris void scic_sds_smp_remote_device_ready_idle_substate_enter(
289f11c7f63SJim Harris    SCI_BASE_OBJECT_T *object
290f11c7f63SJim Harris )
291f11c7f63SJim Harris {
292f11c7f63SJim Harris    SCIC_SDS_REMOTE_DEVICE_T *this_device = (SCIC_SDS_REMOTE_DEVICE_T *)object;
293f11c7f63SJim Harris 
294f11c7f63SJim Harris    SET_STATE_HANDLER(
295f11c7f63SJim Harris       this_device,
296f11c7f63SJim Harris       scic_sds_smp_remote_device_ready_substate_handler_table,
297f11c7f63SJim Harris       SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE
298f11c7f63SJim Harris    );
299f11c7f63SJim Harris 
300f11c7f63SJim Harris    scic_cb_remote_device_ready(
301f11c7f63SJim Harris       scic_sds_remote_device_get_controller(this_device), this_device);
302f11c7f63SJim Harris }
303f11c7f63SJim Harris 
304f11c7f63SJim Harris /**
305f11c7f63SJim Harris  * This is the SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD enter method. This
306f11c7f63SJim Harris  * method sets the remote device objects ready cmd substate handlers, and notify
307f11c7f63SJim Harris  * core user that the device is not ready.
308f11c7f63SJim Harris  *
309f11c7f63SJim Harris  * @param[in] object This is the SCI_BASE_OBJECT which is cast into a
310f11c7f63SJim Harris  *       SCIC_SDS_REMOTE_DEVICE.
311f11c7f63SJim Harris  *
312f11c7f63SJim Harris  * @return none
313f11c7f63SJim Harris  */
314f11c7f63SJim Harris static
scic_sds_smp_remote_device_ready_cmd_substate_enter(SCI_BASE_OBJECT_T * object)315f11c7f63SJim Harris void scic_sds_smp_remote_device_ready_cmd_substate_enter(
316f11c7f63SJim Harris    SCI_BASE_OBJECT_T *object
317f11c7f63SJim Harris )
318f11c7f63SJim Harris {
319f11c7f63SJim Harris    SCIC_SDS_REMOTE_DEVICE_T *this_device = (SCIC_SDS_REMOTE_DEVICE_T *)object;
320f11c7f63SJim Harris 
321f11c7f63SJim Harris    ASSERT(this_device->working_request != NULL);
322f11c7f63SJim Harris 
323f11c7f63SJim Harris    SET_STATE_HANDLER(
324f11c7f63SJim Harris       this_device,
325f11c7f63SJim Harris       scic_sds_smp_remote_device_ready_substate_handler_table,
326f11c7f63SJim Harris       SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD
327f11c7f63SJim Harris    );
328f11c7f63SJim Harris 
329f11c7f63SJim Harris    scic_cb_remote_device_not_ready(
330f11c7f63SJim Harris       scic_sds_remote_device_get_controller(this_device),
331f11c7f63SJim Harris       this_device,
332f11c7f63SJim Harris       SCIC_REMOTE_DEVICE_NOT_READY_SMP_REQUEST_STARTED
333f11c7f63SJim Harris    );
334f11c7f63SJim Harris }
335f11c7f63SJim Harris 
336f11c7f63SJim Harris /**
337f11c7f63SJim Harris  * This is the SCIC_SDS_SSP_REMOTE_DEVICE_READY_SUBSTATE_CMD exit method.
338f11c7f63SJim Harris  *
339f11c7f63SJim Harris  * @param[in] object This is the SCI_BASE_OBJECT which is cast into a
340f11c7f63SJim Harris  *       SCIC_SDS_REMOTE_DEVICE.
341f11c7f63SJim Harris  *
342f11c7f63SJim Harris  * @return none
343f11c7f63SJim Harris  */
344f11c7f63SJim Harris static
scic_sds_smp_remote_device_ready_cmd_substate_exit(SCI_BASE_OBJECT_T * object)345f11c7f63SJim Harris void scic_sds_smp_remote_device_ready_cmd_substate_exit(
346f11c7f63SJim Harris    SCI_BASE_OBJECT_T *object
347f11c7f63SJim Harris )
348f11c7f63SJim Harris {
349f11c7f63SJim Harris    SCIC_SDS_REMOTE_DEVICE_T * this_device = (SCIC_SDS_REMOTE_DEVICE_T *)object;
350f11c7f63SJim Harris 
351f11c7f63SJim Harris    this_device->working_request = NULL;
352f11c7f63SJim Harris }
353f11c7f63SJim Harris 
354f11c7f63SJim Harris // ---------------------------------------------------------------------------
355f11c7f63SJim Harris 
356f11c7f63SJim Harris SCI_BASE_STATE_T
357f11c7f63SJim Harris    scic_sds_smp_remote_device_ready_substate_table[
358f11c7f63SJim Harris                      SCIC_SDS_SMP_REMOTE_DEVICE_READY_MAX_SUBSTATES] =
359f11c7f63SJim Harris {
360f11c7f63SJim Harris    {
361f11c7f63SJim Harris       SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_IDLE,
362f11c7f63SJim Harris       scic_sds_smp_remote_device_ready_idle_substate_enter,
363f11c7f63SJim Harris       NULL
364f11c7f63SJim Harris    },
365f11c7f63SJim Harris    {
366f11c7f63SJim Harris       SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_CMD,
367f11c7f63SJim Harris       scic_sds_smp_remote_device_ready_cmd_substate_enter,
368f11c7f63SJim Harris       scic_sds_smp_remote_device_ready_cmd_substate_exit
369f11c7f63SJim Harris    }
370f11c7f63SJim Harris };
371f11c7f63SJim Harris 
372