1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun * This file is provided under a dual BSD/GPLv2 license. When using or
3*4882a593Smuzhiyun * redistributing this file, you may do so under either license.
4*4882a593Smuzhiyun *
5*4882a593Smuzhiyun * GPL LICENSE SUMMARY
6*4882a593Smuzhiyun *
7*4882a593Smuzhiyun * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
8*4882a593Smuzhiyun *
9*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or modify
10*4882a593Smuzhiyun * it under the terms of version 2 of the GNU General Public License as
11*4882a593Smuzhiyun * published by the Free Software Foundation.
12*4882a593Smuzhiyun *
13*4882a593Smuzhiyun * This program is distributed in the hope that it will be useful, but
14*4882a593Smuzhiyun * WITHOUT ANY WARRANTY; without even the implied warranty of
15*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16*4882a593Smuzhiyun * General Public License for more details.
17*4882a593Smuzhiyun *
18*4882a593Smuzhiyun * You should have received a copy of the GNU General Public License
19*4882a593Smuzhiyun * along with this program; if not, write to the Free Software
20*4882a593Smuzhiyun * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21*4882a593Smuzhiyun * The full GNU General Public License is included in this distribution
22*4882a593Smuzhiyun * in the file called LICENSE.GPL.
23*4882a593Smuzhiyun *
24*4882a593Smuzhiyun * BSD LICENSE
25*4882a593Smuzhiyun *
26*4882a593Smuzhiyun * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
27*4882a593Smuzhiyun * All rights reserved.
28*4882a593Smuzhiyun *
29*4882a593Smuzhiyun * Redistribution and use in source and binary forms, with or without
30*4882a593Smuzhiyun * modification, are permitted provided that the following conditions
31*4882a593Smuzhiyun * are met:
32*4882a593Smuzhiyun *
33*4882a593Smuzhiyun * * Redistributions of source code must retain the above copyright
34*4882a593Smuzhiyun * notice, this list of conditions and the following disclaimer.
35*4882a593Smuzhiyun * * Redistributions in binary form must reproduce the above copyright
36*4882a593Smuzhiyun * notice, this list of conditions and the following disclaimer in
37*4882a593Smuzhiyun * the documentation and/or other materials provided with the
38*4882a593Smuzhiyun * distribution.
39*4882a593Smuzhiyun * * Neither the name of Intel Corporation nor the names of its
40*4882a593Smuzhiyun * contributors may be used to endorse or promote products derived
41*4882a593Smuzhiyun * from this software without specific prior written permission.
42*4882a593Smuzhiyun *
43*4882a593Smuzhiyun * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
44*4882a593Smuzhiyun * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
45*4882a593Smuzhiyun * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
46*4882a593Smuzhiyun * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
47*4882a593Smuzhiyun * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
48*4882a593Smuzhiyun * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
49*4882a593Smuzhiyun * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
50*4882a593Smuzhiyun * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
51*4882a593Smuzhiyun * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
52*4882a593Smuzhiyun * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53*4882a593Smuzhiyun * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54*4882a593Smuzhiyun */
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun #ifndef _ISCI_REMOTE_DEVICE_H_
57*4882a593Smuzhiyun #define _ISCI_REMOTE_DEVICE_H_
58*4882a593Smuzhiyun #include <scsi/libsas.h>
59*4882a593Smuzhiyun #include <linux/kref.h>
60*4882a593Smuzhiyun #include "scu_remote_node_context.h"
61*4882a593Smuzhiyun #include "remote_node_context.h"
62*4882a593Smuzhiyun #include "port.h"
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun enum sci_remote_device_not_ready_reason_code {
65*4882a593Smuzhiyun SCIC_REMOTE_DEVICE_NOT_READY_START_REQUESTED,
66*4882a593Smuzhiyun SCIC_REMOTE_DEVICE_NOT_READY_STOP_REQUESTED,
67*4882a593Smuzhiyun SCIC_REMOTE_DEVICE_NOT_READY_SATA_REQUEST_STARTED,
68*4882a593Smuzhiyun SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED,
69*4882a593Smuzhiyun SCIC_REMOTE_DEVICE_NOT_READY_SMP_REQUEST_STARTED,
70*4882a593Smuzhiyun SCIC_REMOTE_DEVICE_NOT_READY_REASON_CODE_MAX
71*4882a593Smuzhiyun };
72*4882a593Smuzhiyun
73*4882a593Smuzhiyun /**
74*4882a593Smuzhiyun * isci_remote_device - isci representation of a sas expander / end point
75*4882a593Smuzhiyun * @device_port_width: hw setting for number of simultaneous connections
76*4882a593Smuzhiyun * @connection_rate: per-taskcontext connection rate for this device
77*4882a593Smuzhiyun * @working_request: SATA requests have no tag we for unaccelerated
78*4882a593Smuzhiyun * protocols we need a method to associate unsolicited
79*4882a593Smuzhiyun * frames with a pending request
80*4882a593Smuzhiyun */
81*4882a593Smuzhiyun struct isci_remote_device {
82*4882a593Smuzhiyun #define IDEV_START_PENDING 0
83*4882a593Smuzhiyun #define IDEV_STOP_PENDING 1
84*4882a593Smuzhiyun #define IDEV_ALLOCATED 2
85*4882a593Smuzhiyun #define IDEV_GONE 3
86*4882a593Smuzhiyun #define IDEV_IO_READY 4
87*4882a593Smuzhiyun #define IDEV_IO_NCQERROR 5
88*4882a593Smuzhiyun #define IDEV_RNC_LLHANG_ENABLED 6
89*4882a593Smuzhiyun #define IDEV_ABORT_PATH_ACTIVE 7
90*4882a593Smuzhiyun #define IDEV_ABORT_PATH_RESUME_PENDING 8
91*4882a593Smuzhiyun unsigned long flags;
92*4882a593Smuzhiyun struct kref kref;
93*4882a593Smuzhiyun struct isci_port *isci_port;
94*4882a593Smuzhiyun struct domain_device *domain_dev;
95*4882a593Smuzhiyun struct list_head node;
96*4882a593Smuzhiyun struct sci_base_state_machine sm;
97*4882a593Smuzhiyun u32 device_port_width;
98*4882a593Smuzhiyun enum sas_linkrate connection_rate;
99*4882a593Smuzhiyun struct isci_port *owning_port;
100*4882a593Smuzhiyun struct sci_remote_node_context rnc;
101*4882a593Smuzhiyun /* XXX unify with device reference counting and delete */
102*4882a593Smuzhiyun u32 started_request_count;
103*4882a593Smuzhiyun struct isci_request *working_request;
104*4882a593Smuzhiyun u32 not_ready_reason;
105*4882a593Smuzhiyun scics_sds_remote_node_context_callback abort_resume_cb;
106*4882a593Smuzhiyun void *abort_resume_cbparam;
107*4882a593Smuzhiyun };
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun #define ISCI_REMOTE_DEVICE_START_TIMEOUT 5000
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun /* device reference routines must be called under sci_lock */
isci_get_device(struct isci_remote_device * idev)112*4882a593Smuzhiyun static inline struct isci_remote_device *isci_get_device(
113*4882a593Smuzhiyun struct isci_remote_device *idev)
114*4882a593Smuzhiyun {
115*4882a593Smuzhiyun if (idev)
116*4882a593Smuzhiyun kref_get(&idev->kref);
117*4882a593Smuzhiyun return idev;
118*4882a593Smuzhiyun }
119*4882a593Smuzhiyun
isci_lookup_device(struct domain_device * dev)120*4882a593Smuzhiyun static inline struct isci_remote_device *isci_lookup_device(struct domain_device *dev)
121*4882a593Smuzhiyun {
122*4882a593Smuzhiyun struct isci_remote_device *idev = dev->lldd_dev;
123*4882a593Smuzhiyun
124*4882a593Smuzhiyun if (idev && !test_bit(IDEV_GONE, &idev->flags)) {
125*4882a593Smuzhiyun kref_get(&idev->kref);
126*4882a593Smuzhiyun return idev;
127*4882a593Smuzhiyun }
128*4882a593Smuzhiyun
129*4882a593Smuzhiyun return NULL;
130*4882a593Smuzhiyun }
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun void isci_remote_device_release(struct kref *kref);
isci_put_device(struct isci_remote_device * idev)133*4882a593Smuzhiyun static inline void isci_put_device(struct isci_remote_device *idev)
134*4882a593Smuzhiyun {
135*4882a593Smuzhiyun if (idev)
136*4882a593Smuzhiyun kref_put(&idev->kref, isci_remote_device_release);
137*4882a593Smuzhiyun }
138*4882a593Smuzhiyun
139*4882a593Smuzhiyun enum sci_status isci_remote_device_stop(struct isci_host *ihost,
140*4882a593Smuzhiyun struct isci_remote_device *idev);
141*4882a593Smuzhiyun void isci_remote_device_nuke_requests(struct isci_host *ihost,
142*4882a593Smuzhiyun struct isci_remote_device *idev);
143*4882a593Smuzhiyun void isci_remote_device_gone(struct domain_device *domain_dev);
144*4882a593Smuzhiyun int isci_remote_device_found(struct domain_device *domain_dev);
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun /**
147*4882a593Smuzhiyun * sci_remote_device_stop() - This method will stop both transmission and
148*4882a593Smuzhiyun * reception of link activity for the supplied remote device. This method
149*4882a593Smuzhiyun * disables normal IO requests from flowing through to the remote device.
150*4882a593Smuzhiyun * @remote_device: This parameter specifies the device to be stopped.
151*4882a593Smuzhiyun * @timeout: This parameter specifies the number of milliseconds in which the
152*4882a593Smuzhiyun * stop operation should complete.
153*4882a593Smuzhiyun *
154*4882a593Smuzhiyun * An indication of whether the device was successfully stopped. SCI_SUCCESS
155*4882a593Smuzhiyun * This value is returned if the transmission and reception for the device was
156*4882a593Smuzhiyun * successfully stopped.
157*4882a593Smuzhiyun */
158*4882a593Smuzhiyun enum sci_status sci_remote_device_stop(
159*4882a593Smuzhiyun struct isci_remote_device *idev,
160*4882a593Smuzhiyun u32 timeout);
161*4882a593Smuzhiyun
162*4882a593Smuzhiyun /**
163*4882a593Smuzhiyun * sci_remote_device_reset() - This method will reset the device making it
164*4882a593Smuzhiyun * ready for operation. This method must be called anytime the device is
165*4882a593Smuzhiyun * reset either through a SMP phy control or a port hard reset request.
166*4882a593Smuzhiyun * @remote_device: This parameter specifies the device to be reset.
167*4882a593Smuzhiyun *
168*4882a593Smuzhiyun * This method does not actually cause the device hardware to be reset. This
169*4882a593Smuzhiyun * method resets the software object so that it will be operational after a
170*4882a593Smuzhiyun * device hardware reset completes. An indication of whether the device reset
171*4882a593Smuzhiyun * was accepted. SCI_SUCCESS This value is returned if the device reset is
172*4882a593Smuzhiyun * started.
173*4882a593Smuzhiyun */
174*4882a593Smuzhiyun enum sci_status sci_remote_device_reset(
175*4882a593Smuzhiyun struct isci_remote_device *idev);
176*4882a593Smuzhiyun
177*4882a593Smuzhiyun /**
178*4882a593Smuzhiyun * sci_remote_device_reset_complete() - This method informs the device object
179*4882a593Smuzhiyun * that the reset operation is complete and the device can resume operation
180*4882a593Smuzhiyun * again.
181*4882a593Smuzhiyun * @remote_device: This parameter specifies the device which is to be informed
182*4882a593Smuzhiyun * of the reset complete operation.
183*4882a593Smuzhiyun *
184*4882a593Smuzhiyun * An indication that the device is resuming operation. SCI_SUCCESS the device
185*4882a593Smuzhiyun * is resuming operation.
186*4882a593Smuzhiyun */
187*4882a593Smuzhiyun enum sci_status sci_remote_device_reset_complete(
188*4882a593Smuzhiyun struct isci_remote_device *idev);
189*4882a593Smuzhiyun
190*4882a593Smuzhiyun /**
191*4882a593Smuzhiyun * enum sci_remote_device_states - This enumeration depicts all the states
192*4882a593Smuzhiyun * for the common remote device state machine.
193*4882a593Smuzhiyun * @SCI_DEV_INITIAL: Simply the initial state for the base remote device
194*4882a593Smuzhiyun * state machine.
195*4882a593Smuzhiyun *
196*4882a593Smuzhiyun * @SCI_DEV_STOPPED: This state indicates that the remote device has
197*4882a593Smuzhiyun * successfully been stopped. In this state no new IO operations are
198*4882a593Smuzhiyun * permitted. This state is entered from the INITIAL state. This state
199*4882a593Smuzhiyun * is entered from the STOPPING state.
200*4882a593Smuzhiyun *
201*4882a593Smuzhiyun * @SCI_DEV_STARTING: This state indicates the the remote device is in
202*4882a593Smuzhiyun * the process of becoming ready (i.e. starting). In this state no new
203*4882a593Smuzhiyun * IO operations are permitted. This state is entered from the STOPPED
204*4882a593Smuzhiyun * state.
205*4882a593Smuzhiyun *
206*4882a593Smuzhiyun * @SCI_DEV_READY: This state indicates the remote device is now ready.
207*4882a593Smuzhiyun * Thus, the user is able to perform IO operations on the remote device.
208*4882a593Smuzhiyun * This state is entered from the STARTING state.
209*4882a593Smuzhiyun *
210*4882a593Smuzhiyun * @SCI_STP_DEV_IDLE: This is the idle substate for the stp remote
211*4882a593Smuzhiyun * device. When there are no active IO for the device it is is in this
212*4882a593Smuzhiyun * state.
213*4882a593Smuzhiyun *
214*4882a593Smuzhiyun * @SCI_STP_DEV_CMD: This is the command state for for the STP remote
215*4882a593Smuzhiyun * device. This state is entered when the device is processing a
216*4882a593Smuzhiyun * non-NCQ command. The device object will fail any new start IO
217*4882a593Smuzhiyun * requests until this command is complete.
218*4882a593Smuzhiyun *
219*4882a593Smuzhiyun * @SCI_STP_DEV_NCQ: This is the NCQ state for the STP remote device.
220*4882a593Smuzhiyun * This state is entered when the device is processing an NCQ reuqest.
221*4882a593Smuzhiyun * It will remain in this state so long as there is one or more NCQ
222*4882a593Smuzhiyun * requests being processed.
223*4882a593Smuzhiyun *
224*4882a593Smuzhiyun * @SCI_STP_DEV_NCQ_ERROR: This is the NCQ error state for the STP
225*4882a593Smuzhiyun * remote device. This state is entered when an SDB error FIS is
226*4882a593Smuzhiyun * received by the device object while in the NCQ state. The device
227*4882a593Smuzhiyun * object will only accept a READ LOG command while in this state.
228*4882a593Smuzhiyun *
229*4882a593Smuzhiyun * @SCI_STP_DEV_ATAPI_ERROR: This is the ATAPI error state for the STP
230*4882a593Smuzhiyun * ATAPI remote device. This state is entered when ATAPI device sends
231*4882a593Smuzhiyun * error status FIS without data while the device object is in CMD
232*4882a593Smuzhiyun * state. A suspension event is expected in this state. The device
233*4882a593Smuzhiyun * object will resume right away.
234*4882a593Smuzhiyun *
235*4882a593Smuzhiyun * @SCI_STP_DEV_AWAIT_RESET: This is the READY substate indicates the
236*4882a593Smuzhiyun * device is waiting for the RESET task coming to be recovered from
237*4882a593Smuzhiyun * certain hardware specific error.
238*4882a593Smuzhiyun *
239*4882a593Smuzhiyun * @SCI_SMP_DEV_IDLE: This is the ready operational substate for the
240*4882a593Smuzhiyun * remote device. This is the normal operational state for a remote
241*4882a593Smuzhiyun * device.
242*4882a593Smuzhiyun *
243*4882a593Smuzhiyun * @SCI_SMP_DEV_CMD: This is the suspended state for the remote device.
244*4882a593Smuzhiyun * This is the state that the device is placed in when a RNC suspend is
245*4882a593Smuzhiyun * received by the SCU hardware.
246*4882a593Smuzhiyun *
247*4882a593Smuzhiyun * @SCI_DEV_STOPPING: This state indicates that the remote device is in
248*4882a593Smuzhiyun * the process of stopping. In this state no new IO operations are
249*4882a593Smuzhiyun * permitted, but existing IO operations are allowed to complete. This
250*4882a593Smuzhiyun * state is entered from the READY state. This state is entered from
251*4882a593Smuzhiyun * the FAILED state.
252*4882a593Smuzhiyun *
253*4882a593Smuzhiyun * @SCI_DEV_FAILED: This state indicates that the remote device has
254*4882a593Smuzhiyun * failed. In this state no new IO operations are permitted. This
255*4882a593Smuzhiyun * state is entered from the INITIALIZING state. This state is entered
256*4882a593Smuzhiyun * from the READY state.
257*4882a593Smuzhiyun *
258*4882a593Smuzhiyun * @SCI_DEV_RESETTING: This state indicates the device is being reset.
259*4882a593Smuzhiyun * In this state no new IO operations are permitted. This state is
260*4882a593Smuzhiyun * entered from the READY state.
261*4882a593Smuzhiyun *
262*4882a593Smuzhiyun * @SCI_DEV_FINAL: Simply the final state for the base remote device
263*4882a593Smuzhiyun * state machine.
264*4882a593Smuzhiyun */
265*4882a593Smuzhiyun #define REMOTE_DEV_STATES {\
266*4882a593Smuzhiyun C(DEV_INITIAL),\
267*4882a593Smuzhiyun C(DEV_STOPPED),\
268*4882a593Smuzhiyun C(DEV_STARTING),\
269*4882a593Smuzhiyun C(DEV_READY),\
270*4882a593Smuzhiyun C(STP_DEV_IDLE),\
271*4882a593Smuzhiyun C(STP_DEV_CMD),\
272*4882a593Smuzhiyun C(STP_DEV_NCQ),\
273*4882a593Smuzhiyun C(STP_DEV_NCQ_ERROR),\
274*4882a593Smuzhiyun C(STP_DEV_ATAPI_ERROR),\
275*4882a593Smuzhiyun C(STP_DEV_AWAIT_RESET),\
276*4882a593Smuzhiyun C(SMP_DEV_IDLE),\
277*4882a593Smuzhiyun C(SMP_DEV_CMD),\
278*4882a593Smuzhiyun C(DEV_STOPPING),\
279*4882a593Smuzhiyun C(DEV_FAILED),\
280*4882a593Smuzhiyun C(DEV_RESETTING),\
281*4882a593Smuzhiyun C(DEV_FINAL),\
282*4882a593Smuzhiyun }
283*4882a593Smuzhiyun #undef C
284*4882a593Smuzhiyun #define C(a) SCI_##a
285*4882a593Smuzhiyun enum sci_remote_device_states REMOTE_DEV_STATES;
286*4882a593Smuzhiyun #undef C
287*4882a593Smuzhiyun const char *dev_state_name(enum sci_remote_device_states state);
288*4882a593Smuzhiyun
rnc_to_dev(struct sci_remote_node_context * rnc)289*4882a593Smuzhiyun static inline struct isci_remote_device *rnc_to_dev(struct sci_remote_node_context *rnc)
290*4882a593Smuzhiyun {
291*4882a593Smuzhiyun struct isci_remote_device *idev;
292*4882a593Smuzhiyun
293*4882a593Smuzhiyun idev = container_of(rnc, typeof(*idev), rnc);
294*4882a593Smuzhiyun
295*4882a593Smuzhiyun return idev;
296*4882a593Smuzhiyun }
297*4882a593Smuzhiyun
sci_remote_device_decrement_request_count(struct isci_remote_device * idev)298*4882a593Smuzhiyun static inline void sci_remote_device_decrement_request_count(struct isci_remote_device *idev)
299*4882a593Smuzhiyun {
300*4882a593Smuzhiyun /* XXX delete this voodoo when converting to the top-level device
301*4882a593Smuzhiyun * reference count
302*4882a593Smuzhiyun */
303*4882a593Smuzhiyun if (WARN_ONCE(idev->started_request_count == 0,
304*4882a593Smuzhiyun "%s: tried to decrement started_request_count past 0!?",
305*4882a593Smuzhiyun __func__))
306*4882a593Smuzhiyun /* pass */;
307*4882a593Smuzhiyun else
308*4882a593Smuzhiyun idev->started_request_count--;
309*4882a593Smuzhiyun }
310*4882a593Smuzhiyun
311*4882a593Smuzhiyun void isci_dev_set_hang_detection_timeout(struct isci_remote_device *idev, u32 timeout);
312*4882a593Smuzhiyun
313*4882a593Smuzhiyun enum sci_status sci_remote_device_frame_handler(
314*4882a593Smuzhiyun struct isci_remote_device *idev,
315*4882a593Smuzhiyun u32 frame_index);
316*4882a593Smuzhiyun
317*4882a593Smuzhiyun enum sci_status sci_remote_device_event_handler(
318*4882a593Smuzhiyun struct isci_remote_device *idev,
319*4882a593Smuzhiyun u32 event_code);
320*4882a593Smuzhiyun
321*4882a593Smuzhiyun enum sci_status sci_remote_device_start_io(
322*4882a593Smuzhiyun struct isci_host *ihost,
323*4882a593Smuzhiyun struct isci_remote_device *idev,
324*4882a593Smuzhiyun struct isci_request *ireq);
325*4882a593Smuzhiyun
326*4882a593Smuzhiyun enum sci_status sci_remote_device_start_task(
327*4882a593Smuzhiyun struct isci_host *ihost,
328*4882a593Smuzhiyun struct isci_remote_device *idev,
329*4882a593Smuzhiyun struct isci_request *ireq);
330*4882a593Smuzhiyun
331*4882a593Smuzhiyun enum sci_status sci_remote_device_complete_io(
332*4882a593Smuzhiyun struct isci_host *ihost,
333*4882a593Smuzhiyun struct isci_remote_device *idev,
334*4882a593Smuzhiyun struct isci_request *ireq);
335*4882a593Smuzhiyun
336*4882a593Smuzhiyun void sci_remote_device_post_request(
337*4882a593Smuzhiyun struct isci_remote_device *idev,
338*4882a593Smuzhiyun u32 request);
339*4882a593Smuzhiyun
340*4882a593Smuzhiyun enum sci_status sci_remote_device_terminate_requests(
341*4882a593Smuzhiyun struct isci_remote_device *idev);
342*4882a593Smuzhiyun
343*4882a593Smuzhiyun int isci_remote_device_is_safe_to_abort(
344*4882a593Smuzhiyun struct isci_remote_device *idev);
345*4882a593Smuzhiyun
346*4882a593Smuzhiyun enum sci_status
347*4882a593Smuzhiyun sci_remote_device_abort_requests_pending_abort(
348*4882a593Smuzhiyun struct isci_remote_device *idev);
349*4882a593Smuzhiyun
350*4882a593Smuzhiyun enum sci_status isci_remote_device_suspend(
351*4882a593Smuzhiyun struct isci_host *ihost,
352*4882a593Smuzhiyun struct isci_remote_device *idev);
353*4882a593Smuzhiyun
354*4882a593Smuzhiyun enum sci_status sci_remote_device_resume(
355*4882a593Smuzhiyun struct isci_remote_device *idev,
356*4882a593Smuzhiyun scics_sds_remote_node_context_callback cb_fn,
357*4882a593Smuzhiyun void *cb_p);
358*4882a593Smuzhiyun
359*4882a593Smuzhiyun enum sci_status isci_remote_device_resume_from_abort(
360*4882a593Smuzhiyun struct isci_host *ihost,
361*4882a593Smuzhiyun struct isci_remote_device *idev);
362*4882a593Smuzhiyun
363*4882a593Smuzhiyun enum sci_status isci_remote_device_reset(
364*4882a593Smuzhiyun struct isci_host *ihost,
365*4882a593Smuzhiyun struct isci_remote_device *idev);
366*4882a593Smuzhiyun
367*4882a593Smuzhiyun enum sci_status isci_remote_device_reset_complete(
368*4882a593Smuzhiyun struct isci_host *ihost,
369*4882a593Smuzhiyun struct isci_remote_device *idev);
370*4882a593Smuzhiyun
371*4882a593Smuzhiyun enum sci_status isci_remote_device_suspend_terminate(
372*4882a593Smuzhiyun struct isci_host *ihost,
373*4882a593Smuzhiyun struct isci_remote_device *idev,
374*4882a593Smuzhiyun struct isci_request *ireq);
375*4882a593Smuzhiyun
376*4882a593Smuzhiyun enum sci_status isci_remote_device_terminate_requests(
377*4882a593Smuzhiyun struct isci_host *ihost,
378*4882a593Smuzhiyun struct isci_remote_device *idev,
379*4882a593Smuzhiyun struct isci_request *ireq);
380*4882a593Smuzhiyun enum sci_status sci_remote_device_suspend(struct isci_remote_device *idev,
381*4882a593Smuzhiyun enum sci_remote_node_suspension_reasons reason);
382*4882a593Smuzhiyun #endif /* !defined(_ISCI_REMOTE_DEVICE_H_) */
383