1230557Sjimharris/*-
2230557Sjimharris * This file is provided under a dual BSD/GPLv2 license.  When using or
3230557Sjimharris * redistributing this file, you may do so under either license.
4230557Sjimharris *
5230557Sjimharris * GPL LICENSE SUMMARY
6230557Sjimharris *
7230557Sjimharris * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
8230557Sjimharris *
9230557Sjimharris * This program is free software; you can redistribute it and/or modify
10230557Sjimharris * it under the terms of version 2 of the GNU General Public License as
11230557Sjimharris * published by the Free Software Foundation.
12230557Sjimharris *
13230557Sjimharris * This program is distributed in the hope that it will be useful, but
14230557Sjimharris * WITHOUT ANY WARRANTY; without even the implied warranty of
15230557Sjimharris * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16230557Sjimharris * General Public License for more details.
17230557Sjimharris *
18230557Sjimharris * You should have received a copy of the GNU General Public License
19230557Sjimharris * along with this program; if not, write to the Free Software
20230557Sjimharris * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21230557Sjimharris * The full GNU General Public License is included in this distribution
22230557Sjimharris * in the file called LICENSE.GPL.
23230557Sjimharris *
24230557Sjimharris * BSD LICENSE
25230557Sjimharris *
26230557Sjimharris * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
27230557Sjimharris * All rights reserved.
28230557Sjimharris *
29230557Sjimharris * Redistribution and use in source and binary forms, with or without
30230557Sjimharris * modification, are permitted provided that the following conditions
31230557Sjimharris * are met:
32230557Sjimharris *
33230557Sjimharris *   * Redistributions of source code must retain the above copyright
34230557Sjimharris *     notice, this list of conditions and the following disclaimer.
35230557Sjimharris *   * Redistributions in binary form must reproduce the above copyright
36230557Sjimharris *     notice, this list of conditions and the following disclaimer in
37230557Sjimharris *     the documentation and/or other materials provided with the
38230557Sjimharris *     distribution.
39230557Sjimharris *
40230557Sjimharris * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
41230557Sjimharris * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
42230557Sjimharris * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
43230557Sjimharris * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
44230557Sjimharris * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45230557Sjimharris * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
46230557Sjimharris * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
47230557Sjimharris * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
48230557Sjimharris * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49230557Sjimharris * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
50230557Sjimharris * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
51230557Sjimharris *
52230557Sjimharris * $FreeBSD$
53230557Sjimharris */
54230557Sjimharris#ifndef _SCIF_SAS_REMOTE_DEVICE_H_
55230557Sjimharris#define _SCIF_SAS_REMOTE_DEVICE_H_
56230557Sjimharris
57230557Sjimharris/**
58230557Sjimharris * @file
59230557Sjimharris *
60230557Sjimharris * @brief This file contains the protected interface structures, constants,
61230557Sjimharris *        and methods for the SCIF_SAS_REMOTE_DEVICE object.
62230557Sjimharris */
63230557Sjimharris
64230557Sjimharris#ifdef __cplusplus
65230557Sjimharrisextern "C" {
66230557Sjimharris#endif // __cplusplus
67230557Sjimharris
68230557Sjimharris#include <dev/isci/scil/scif_remote_device.h>
69230557Sjimharris
70230557Sjimharris#include <dev/isci/scil/sci_base_remote_device.h>
71230557Sjimharris#include <dev/isci/scil/sci_base_request.h>
72230557Sjimharris#include <dev/isci/scil/sci_base_state_machine_logger.h>
73230557Sjimharris#include <dev/isci/scil/scif_sas_stp_remote_device.h>
74230557Sjimharris#include <dev/isci/scil/scif_sas_smp_remote_device.h>
75230557Sjimharris
76230557Sjimharris
77230557Sjimharrisstruct SCIF_SAS_DOMAIN;
78230557Sjimharrisstruct SCIF_SAS_REMOTE_DEVICE;
79230557Sjimharrisstruct SCIF_SAS_REQUEST;
80230557Sjimharris
81230557Sjimharris/**
82230557Sjimharris * This constant indicates the number of milliseconds to wait for the core
83230557Sjimharris * to start/stop it's remote device object.
84230557Sjimharris */
85230557Sjimharris#define SCIF_SAS_REMOTE_DEVICE_CORE_OP_TIMEOUT 1000
86230557Sjimharris
87230557Sjimharris/**
88230557Sjimharris * @enum _SCIF_SAS_REMOTE_DEVICE_STARTING_SUBSTATES
89230557Sjimharris *
90230557Sjimharris * @brief This enumeration depicts all the substates for the remote device's
91230557Sjimharris *        starting substate machine.
92230557Sjimharris */
93230557Sjimharristypedef enum _SCIF_SAS_REMOTE_DEVICE_STARTING_SUBSTATES
94230557Sjimharris{
95230557Sjimharris   /**
96230557Sjimharris    * This state indicates that the framework is waiting for the core to
97230557Sjimharris    * issue a scic_cb_remote_device_start_complete() notification.
98230557Sjimharris    */
99230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_STARTING_SUBSTATE_AWAIT_COMPLETE,
100230557Sjimharris
101230557Sjimharris   /**
102230557Sjimharris    * This state indicates that the core has received the core's
103230557Sjimharris    * scic_cb_remote_device_start_complete() notification.
104230557Sjimharris    */
105230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_STARTING_SUBSTATE_AWAIT_READY,
106230557Sjimharris
107230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_STARTING_SUBSTATE_MAX_STATES
108230557Sjimharris
109230557Sjimharris} SCIF_SAS_REMOTE_DEVICE_STARTING_SUBSTATES;
110230557Sjimharris
111230557Sjimharris/**
112230557Sjimharris * @enum _SCIF_SAS_REMOTE_DEVICE_READY_SUBSTATES
113230557Sjimharris *
114230557Sjimharris * @brief This enumeration depicts all of the substates for the remote
115230557Sjimharris *        device READY substate machine.
116230557Sjimharris */
117230557Sjimharristypedef enum _SCIF_SAS_REMOTE_DEVICE_READY_SUBSTATES
118230557Sjimharris{
119230557Sjimharris   /**
120230557Sjimharris    * The Operational sub-state indicates that the remote device object
121230557Sjimharris    * is capable of receiving and handling all request types.
122230557Sjimharris    */
123230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_READY_SUBSTATE_OPERATIONAL,
124230557Sjimharris
125230557Sjimharris   /**
126230557Sjimharris    * This substate indicates that core remote device is not ready.
127230557Sjimharris    * As a result, no new IO or Task Management requests are allowed.
128230557Sjimharris    */
129230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_READY_SUBSTATE_SUSPENDED,
130230557Sjimharris
131230557Sjimharris   /**
132230557Sjimharris    * This substate indicates that task management to this device is
133230557Sjimharris    * ongoing and new IO requests are not allowed.
134230557Sjimharris    */
135230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_READY_SUBSTATE_TASK_MGMT,
136230557Sjimharris
137230557Sjimharris   /**
138230557Sjimharris   * This substate indicates that core remote device is not ready due
139230557Sjimharris   *  to an NCQ error.  As a result, no new IO requests are allowed.
140230557Sjimharris   */
141230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_READY_SUBSTATE_NCQ_ERROR,
142230557Sjimharris
143230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_READY_SUBSTATE_MAX_STATES
144230557Sjimharris
145230557Sjimharris} SCIF_SAS_REMOTE_DEVICE_READY_SUBSTATES;
146230557Sjimharris
147230557Sjimharrisstruct SCIF_SAS_REMOTE_DEVICE;
148230557Sjimharristypedef void (*SCIF_SAS_REMOTE_DEVICE_COMPLETION_HANDLER_T)(
149230557Sjimharris   struct SCIF_SAS_REMOTE_DEVICE *,
150230557Sjimharris   SCI_STATUS
151230557Sjimharris);
152230557Sjimharris
153230557Sjimharristypedef void (*SCIF_SAS_REMOTE_DEVICE_HANDLER_T)(
154230557Sjimharris   struct SCIF_SAS_REMOTE_DEVICE *
155230557Sjimharris);
156230557Sjimharris
157230557Sjimharristypedef void (*SCIF_SAS_REMOTE_DEVICE_NOT_READY_HANDLER_T)(
158230557Sjimharris   struct SCIF_SAS_REMOTE_DEVICE *,
159230557Sjimharris   U32
160230557Sjimharris);
161230557Sjimharris
162230557Sjimharris/**
163230557Sjimharris * @struct SCIF_SAS_REMOTE_DEVICE_STATE_HANDLER
164230557Sjimharris *
165230557Sjimharris * @brief This structure defines the state handler methods for states and
166230557Sjimharris *        substates applicable for the framework remote device object.
167230557Sjimharris */
168230557Sjimharristypedef struct SCIF_SAS_REMOTE_DEVICE_STATE_HANDLER
169230557Sjimharris{
170230557Sjimharris   SCI_BASE_REMOTE_DEVICE_STATE_HANDLER_T      parent;
171230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_COMPLETION_HANDLER_T start_complete_handler;
172230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_COMPLETION_HANDLER_T stop_complete_handler;
173230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_HANDLER_T            ready_handler;
174230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_NOT_READY_HANDLER_T  not_ready_handler;
175230557Sjimharris   SCI_BASE_REMOTE_DEVICE_REQUEST_HANDLER_T    start_high_priority_io_handler;
176230557Sjimharris   SCI_BASE_REMOTE_DEVICE_HIGH_PRIORITY_REQUEST_COMPLETE_HANDLER_T    complete_high_priority_io_handler;
177230557Sjimharris} SCIF_SAS_REMOTE_DEVICE_STATE_HANDLER_T;
178230557Sjimharris
179230557Sjimharris/**
180230557Sjimharris * @struct SCIF_SAS_REMOTE_DEVICE
181230557Sjimharris *
182230557Sjimharris * @brief The SCI SAS Framework remote device object abstracts the SAS remote
183230557Sjimharris *        device level behavior for the framework component.  Additionally,
184230557Sjimharris *        it provides a higher level of abstraction for the core remote
185230557Sjimharris *        device object.
186230557Sjimharris */
187230557Sjimharristypedef struct SCIF_SAS_REMOTE_DEVICE
188230557Sjimharris{
189230557Sjimharris   /**
190230557Sjimharris    * The SCI_BASE_REMOTE_DEVICE is the parent object for the
191230557Sjimharris    * SCIF_SAS_REMOTE_DEVICE object.
192230557Sjimharris    */
193230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T  parent;
194230557Sjimharris
195230557Sjimharris   /**
196230557Sjimharris    * This field contains the handle for the SCI Core remote device object
197230557Sjimharris    * that is managed by this framework controller.
198230557Sjimharris    */
199230557Sjimharris   SCI_REMOTE_DEVICE_HANDLE_T  core_object;
200230557Sjimharris
201230557Sjimharris   /**
202230557Sjimharris    * This field references the list of state specific handler methods to
203230557Sjimharris    * be utilized for this remote device instance.
204230557Sjimharris    */
205230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_STATE_HANDLER_T * state_handlers;
206230557Sjimharris
207230557Sjimharris   /**
208230557Sjimharris    * This field specifies the state machine utilized to manage the
209230557Sjimharris    * starting remote device substate machine.
210230557Sjimharris    */
211230557Sjimharris   SCI_BASE_STATE_MACHINE_T starting_substate_machine;
212230557Sjimharris
213230557Sjimharris   /**
214230557Sjimharris    * This field specifies the state machine utilized to manage the
215230557Sjimharris    * starting remote device substate machine.
216230557Sjimharris    */
217230557Sjimharris   SCI_BASE_STATE_MACHINE_T ready_substate_machine;
218230557Sjimharris
219230557Sjimharris   union
220230557Sjimharris   {
221230557Sjimharris      /**
222230557Sjimharris       * This field specifies the information specific to SATA/STP device
223230557Sjimharris       * instances.  This field is not utilized for SSP/SMP.
224230557Sjimharris       */
225230557Sjimharris      SCIF_SAS_STP_REMOTE_DEVICE_T  stp_device;
226230557Sjimharris
227230557Sjimharris      /**
228230557Sjimharris       * This field specifies the information specific to SMP device instances.
229230557Sjimharris       * This field is not utilized for SSP/SATA/STP.
230230557Sjimharris       */
231230557Sjimharris      SCIF_SAS_SMP_REMOTE_DEVICE_T  smp_device;
232230557Sjimharris
233230557Sjimharris   }protocol_device;
234230557Sjimharris
235230557Sjimharris   /**
236230557Sjimharris    * This field indicates the domain object containing this remote device.
237230557Sjimharris    */
238230557Sjimharris   struct SCIF_SAS_DOMAIN * domain;
239230557Sjimharris
240230557Sjimharris   /**
241230557Sjimharris    * This field counts the number of requests (IO and task management)
242230557Sjimharris    * that are currently outstanding for this device.
243230557Sjimharris    */
244230557Sjimharris   U32 request_count;
245230557Sjimharris
246230557Sjimharris   /**
247230557Sjimharris    * This field counts the number of only task management request that are
248230557Sjimharris    * currently outstanding for this device.
249230557Sjimharris    */
250230557Sjimharris   U32 task_request_count;
251230557Sjimharris
252230557Sjimharris   /**
253230557Sjimharris    * This field is utilize to store the status value of various operations
254230557Sjimharris    * the can be executed on this remote device instance.
255230557Sjimharris    */
256230557Sjimharris   SCI_STATUS operation_status;
257230557Sjimharris
258230557Sjimharris   /**
259230557Sjimharris    * This field is utilize to indicate that the remote device should be
260230557Sjimharris    * destructed when it finally reaches the stopped state.  This will
261230557Sjimharris    * include destructing the core remote device as well.
262230557Sjimharris    */
263230557Sjimharris   BOOL  destruct_when_stopped;
264230557Sjimharris
265230557Sjimharris   /**
266230557Sjimharris    * This field marks a device state of being discovered or not, majorly used
267230557Sjimharris    * during re-discover procedure.
268230557Sjimharris    */
269230557Sjimharris   BOOL is_currently_discovered;
270230557Sjimharris
271230557Sjimharris   /**
272230557Sjimharris    * This filed stores the expander device this device connected to, only if this
273230557Sjimharris    * device is behind expander. So this field also served as a flag to tell if a
274230557Sjimharris    * device is a EA one.
275230557Sjimharris    */
276230557Sjimharris   struct SCIF_SAS_REMOTE_DEVICE * containing_device;
277230557Sjimharris
278230557Sjimharris   /**
279230557Sjimharris    * This field stores the expander phy identifier for an expander attached
280230557Sjimharris    * device. This field is only used by expander attached device.
281230557Sjimharris    */
282230557Sjimharris   U8 expander_phy_identifier;
283230557Sjimharris
284230557Sjimharris   /**
285230557Sjimharris    * This field stores the port width for a device. Most devices are narrow port
286230557Sjimharris    * device, their port width is 1. If a device is a wide port device, their
287230557Sjimharris    * port width is larger than 1.
288230557Sjimharris    */
289230557Sjimharris   U8 device_port_width;
290230557Sjimharris
291230557Sjimharris   /**
292230557Sjimharris    * This field stores the destination state for a remote device in UPDATING
293230557Sjimharris    * PORT WIDTH state. The possible destination states for a remote device in
294230557Sjimharris    * UPDATING_PORT_WIDTH state are READY or STOPPING.
295230557Sjimharris    */
296230557Sjimharris   U16 destination_state;
297230557Sjimharris
298230557Sjimharris   /**
299230557Sjimharris    * This field stores the scheduled/delayed EA target reset request.
300230557Sjimharris    */
301230557Sjimharris   struct SCIF_SAS_REQUEST * ea_target_reset_request_scheduled;
302230557Sjimharris
303230557Sjimharris   #ifdef SCI_LOGGING
304230557Sjimharris   /**
305230557Sjimharris    * This field is the observer of the base state machine for this device
306230557Sjimharris    * object.
307230557Sjimharris    */
308230557Sjimharris   SCI_BASE_OBSERVER_T base_state_machine_observer;
309230557Sjimharris
310230557Sjimharris   /**
311230557Sjimharris    * This field is the state machine logger of the startig substate machine for
312230557Sjimharris    * this device object.
313230557Sjimharris    */
314230557Sjimharris   SCI_BASE_STATE_MACHINE_LOGGER_T starting_substate_machine_logger;
315230557Sjimharris
316230557Sjimharris   /**
317230557Sjimharris    * This field is the state machine logger of the ready substate machine for
318230557Sjimharris    * this device object.
319230557Sjimharris    */
320230557Sjimharris   SCI_BASE_STATE_MACHINE_LOGGER_T ready_substate_machine_logger;
321230557Sjimharris   #endif // SCI_LOGGING
322230557Sjimharris
323230557Sjimharris} SCIF_SAS_REMOTE_DEVICE_T;
324230557Sjimharris
325230557Sjimharrisextern SCI_BASE_STATE_T scif_sas_remote_device_state_table[];
326230557Sjimharrisextern SCIF_SAS_REMOTE_DEVICE_STATE_HANDLER_T
327230557Sjimharris   scif_sas_remote_device_state_handler_table[];
328230557Sjimharris
329230557Sjimharrisextern SCI_BASE_STATE_T scif_sas_remote_device_starting_substate_table[];
330230557Sjimharrisextern SCIF_SAS_REMOTE_DEVICE_STATE_HANDLER_T
331230557Sjimharris   scif_sas_remote_device_starting_substate_handler_table[];
332230557Sjimharris
333230557Sjimharrisextern SCI_BASE_STATE_T scif_sas_remote_device_ready_substate_table[];
334230557Sjimharrisextern SCIF_SAS_REMOTE_DEVICE_STATE_HANDLER_T
335230557Sjimharris   scif_sas_remote_device_ready_substate_handler_table[];
336230557Sjimharris
337230557Sjimharris/**
338230557Sjimharris * @enum
339230557Sjimharris *
340230557Sjimharris * This enumeration is used to define the end destination state for the
341230557Sjimharris * framework remote device.
342230557Sjimharris */
343230557Sjimharrisenum SCIF_SAS_REMOTE_DEVICE_DESTINATION_STATE
344230557Sjimharris{
345230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_DESTINATION_STATE_UNSPECIFIED,
346230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_DESTINATION_STATE_READY,
347230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_DESTINATION_STATE_STOPPING,
348230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_DESTINATION_STATE_UPDATING_PORT_WIDTH
349230557Sjimharris};
350230557Sjimharris
351230557Sjimharris//******************************************************************************
352230557Sjimharris//* P R O T E C T E D   M E T H O D S
353230557Sjimharris//******************************************************************************
354230557Sjimharrisvoid scif_sas_remote_device_save_report_phy_sata_information(
355230557Sjimharris   SMP_RESPONSE_REPORT_PHY_SATA_T * report_phy_sata_response
356230557Sjimharris);
357230557Sjimharris
358230557Sjimharrisvoid scif_sas_remote_device_target_reset(
359230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_T * fw_device,
360230557Sjimharris   struct SCIF_SAS_REQUEST  * fw_request
361230557Sjimharris);
362230557Sjimharris
363230557Sjimharrisvoid scif_sas_remote_device_target_reset_complete(
364230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_T * fw_device,
365230557Sjimharris   struct SCIF_SAS_REQUEST  * fw_request,
366230557Sjimharris   SCI_STATUS                 completion_status
367230557Sjimharris);
368230557Sjimharris
369230557Sjimharris#ifdef SCI_LOGGING
370230557Sjimharrisvoid scif_sas_remote_device_initialize_state_logging(
371230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_T * remote_device
372230557Sjimharris);
373230557Sjimharris
374230557Sjimharrisvoid scif_sas_remote_device_deinitialize_state_logging(
375230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_T * remote_device
376230557Sjimharris);
377230557Sjimharris#else // SCI_LOGGING
378230557Sjimharris#define scif_sas_remote_device_initialize_state_logging(x)
379230557Sjimharris#define scif_sas_remote_device_deinitialize_state_logging(x)
380230557Sjimharris#endif // SCI_LOGGING
381230557Sjimharris
382230557Sjimharris//******************************************************************************
383230557Sjimharris//* R E A D Y   O P E R A T I O N A L   S T A T E   H A N D L E R S
384230557Sjimharris//******************************************************************************
385230557Sjimharris
386230557SjimharrisSCI_STATUS scif_sas_remote_device_ready_operational_complete_io_handler(
387230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device,
388230557Sjimharris   SCI_BASE_REQUEST_T       * io_request
389230557Sjimharris);
390230557Sjimharris
391230557SjimharrisSCI_STATUS scif_sas_remote_device_ready_operational_complete_task_handler(
392230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device,
393230557Sjimharris   SCI_BASE_REQUEST_T       * task_request
394230557Sjimharris);
395230557Sjimharris
396230557SjimharrisSCI_STATUS scif_sas_remote_device_ready_task_management_complete_task_handler(
397230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device,
398230557Sjimharris   SCI_BASE_REQUEST_T       * task_request
399230557Sjimharris);
400230557Sjimharris
401230557Sjimharris//******************************************************************************
402230557Sjimharris//* D E F A U L T   S T A T E   H A N D L E R S
403230557Sjimharris//******************************************************************************
404230557Sjimharris
405230557SjimharrisSCI_STATUS scif_sas_remote_device_default_start_handler(
406230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device
407230557Sjimharris);
408230557Sjimharris
409230557SjimharrisSCI_STATUS scif_sas_remote_device_default_stop_handler(
410230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device
411230557Sjimharris);
412230557Sjimharris
413230557SjimharrisSCI_STATUS scif_sas_remote_device_default_reset_handler(
414230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device
415230557Sjimharris);
416230557Sjimharris
417230557SjimharrisSCI_STATUS scif_sas_remote_device_default_reset_complete_handler(
418230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device
419230557Sjimharris);
420230557Sjimharris
421230557SjimharrisSCI_STATUS scif_sas_remote_device_default_start_io_handler(
422230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device,
423230557Sjimharris   SCI_BASE_REQUEST_T       * io_request
424230557Sjimharris);
425230557Sjimharris
426230557Sjimharrisvoid scif_sas_remote_device_default_start_complete_handler(
427230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_T * fw_device,
428230557Sjimharris   SCI_STATUS                 completion_status
429230557Sjimharris);
430230557Sjimharris
431230557Sjimharrisvoid scif_sas_remote_device_default_stop_complete_handler(
432230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_T * fw_device,
433230557Sjimharris   SCI_STATUS                 completion_status
434230557Sjimharris);
435230557Sjimharris
436230557SjimharrisSCI_STATUS scif_sas_remote_device_default_destruct_handler(
437230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device
438230557Sjimharris);
439230557Sjimharris
440230557SjimharrisSCI_STATUS scif_sas_remote_device_default_complete_io_handler(
441230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device,
442230557Sjimharris   SCI_BASE_REQUEST_T       * io_request
443230557Sjimharris);
444230557Sjimharris
445230557SjimharrisSCI_STATUS scif_sas_remote_device_default_complete_high_priority_io_handler(
446230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device,
447230557Sjimharris   SCI_BASE_REQUEST_T       * io_request,
448230557Sjimharris   void                     * response_data,
449230557Sjimharris   SCI_IO_STATUS              completion_status
450230557Sjimharris);
451230557Sjimharris
452230557SjimharrisSCI_STATUS scif_sas_remote_device_default_continue_io_handler(
453230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device,
454230557Sjimharris   SCI_BASE_REQUEST_T       * io_request
455230557Sjimharris);
456230557Sjimharris
457230557SjimharrisSCI_STATUS scif_sas_remote_device_default_start_task_handler(
458230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device,
459230557Sjimharris   SCI_BASE_REQUEST_T       * task_request
460230557Sjimharris);
461230557Sjimharris
462230557SjimharrisSCI_STATUS scif_sas_remote_device_default_complete_task_handler(
463230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device,
464230557Sjimharris   SCI_BASE_REQUEST_T       * task_request
465230557Sjimharris);
466230557Sjimharris
467230557Sjimharrisvoid scif_sas_remote_device_default_ready_handler(
468230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_T * fw_device
469230557Sjimharris);
470230557Sjimharris
471230557Sjimharrisvoid scif_sas_remote_device_default_not_ready_handler(
472230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_T * fw_device,
473230557Sjimharris   U32                        reason_code
474230557Sjimharris);
475230557Sjimharris
476230557SjimharrisSCI_STATUS scif_sas_remote_device_ready_task_management_start_high_priority_io_handler(
477230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device,
478230557Sjimharris   SCI_BASE_REQUEST_T       * io_request
479230557Sjimharris);
480230557Sjimharris
481230557SjimharrisSCI_STATUS scif_sas_remote_device_ready_task_management_complete_high_priority_io_handler(
482230557Sjimharris   SCI_BASE_REMOTE_DEVICE_T * remote_device,
483230557Sjimharris   SCI_BASE_REQUEST_T       * io_request,
484230557Sjimharris   void                     * response_data,
485230557Sjimharris   SCI_IO_STATUS              completion_status
486230557Sjimharris);
487230557Sjimharris
488230557Sjimharris#if !defined(DISABLE_WIDE_PORTED_TARGETS)
489230557SjimharrisSCI_STATUS scif_sas_remote_device_update_port_width(
490230557Sjimharris   SCIF_SAS_REMOTE_DEVICE_T * fw_device,
491230557Sjimharris   U8                         new_port_width
492230557Sjimharris);
493230557Sjimharris#else // !defined(DISABLE_WIDE_PORTED_TARGETS)
494230557Sjimharris#define scif_sas_remote_device_update_port_width(device) SCI_FAILURE
495230557Sjimharris#endif //#if !defined(DISABLE_WIDE_PORTED_TARGETS)
496230557Sjimharris
497230557Sjimharris#ifdef __cplusplus
498230557Sjimharris}
499230557Sjimharris#endif // __cplusplus
500230557Sjimharris
501230557Sjimharris#endif // _SCIF_SAS_REMOTE_DEVICE_H_
502230557Sjimharris
503