xref: /freebsd/sys/dev/isci/scil/scic_io_request.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 _SCIC_IO_REQUEST_H_
55f11c7f63SJim Harris #define _SCIC_IO_REQUEST_H_
56f11c7f63SJim Harris 
57f11c7f63SJim Harris /**
58f11c7f63SJim Harris  * @file
59f11c7f63SJim Harris  *
60f11c7f63SJim Harris  * @brief This file contains the structures and interface methods that
61f11c7f63SJim Harris  *        can be referenced and used by the SCI user for the SCI IO request
62f11c7f63SJim Harris  *        object.
63f11c7f63SJim Harris  *
64f11c7f63SJim Harris  * @todo Determine the failure situations and return values.
65f11c7f63SJim Harris  */
66f11c7f63SJim Harris 
67f11c7f63SJim Harris #ifdef __cplusplus
68f11c7f63SJim Harris extern "C" {
69f11c7f63SJim Harris #endif // __cplusplus
70f11c7f63SJim Harris 
71f11c7f63SJim Harris #include <dev/isci/scil/sci_types.h>
72f11c7f63SJim Harris #include <dev/isci/scil/sci_status.h>
73f11c7f63SJim Harris #include <dev/isci/scil/intel_sas.h>
74f11c7f63SJim Harris 
75f11c7f63SJim Harris /**
76f11c7f63SJim Harris  * @struct SCIC_IO_SSP_PARAMETERS
77f11c7f63SJim Harris  * @brief  This structure contains additional optional parameters for SSP
78f11c7f63SJim Harris  *         IO requests.  These parameters are utilized with the
79f11c7f63SJim Harris  *         scic_io_request_construct_advanced_ssp() method.
80f11c7f63SJim Harris  *
81f11c7f63SJim Harris  * @todo Add Block-guard/DIF, TLR
82f11c7f63SJim Harris  */
83f11c7f63SJim Harris typedef struct SCIC_IO_SSP_PARAMETERS
84f11c7f63SJim Harris {
85f11c7f63SJim Harris    /**
86f11c7f63SJim Harris     * Data Integrity Format (DIF) is also known as protection information
87f11c7f63SJim Harris     * or block-guard.  This sub-structure contains DIF specific feature
88f11c7f63SJim Harris     * information for SSP IO requests.
89f11c7f63SJim Harris     */
90f11c7f63SJim Harris    struct
91f11c7f63SJim Harris    {
92f11c7f63SJim Harris       void * placeholder;
93f11c7f63SJim Harris    } dif;
94f11c7f63SJim Harris 
95f11c7f63SJim Harris    /**
96f11c7f63SJim Harris     * Transport Layer Retries (TLR) is an SSP protocol specific feature.
97f11c7f63SJim Harris     * This sub-structure contains Transport Layer Retries (TLR) specific
98f11c7f63SJim Harris     * feature information for SSP IO requests.
99f11c7f63SJim Harris     */
100f11c7f63SJim Harris    struct
101f11c7f63SJim Harris    {
102f11c7f63SJim Harris       void * placeholder;
103f11c7f63SJim Harris    } tlr;
104f11c7f63SJim Harris 
105f11c7f63SJim Harris } SCIC_IO_SSP_PARAMETERS_T;
106f11c7f63SJim Harris 
107f11c7f63SJim Harris /**
108f11c7f63SJim Harris  * @struct SCIC_IO_PARAMETERS
109f11c7f63SJim Harris  * @brief  This structure contains additional optional parameters for
110f11c7f63SJim Harris  *         STP/SATA IO requests.  These parameters are utilized with the
111f11c7f63SJim Harris  *         scic_io_request_construct_advanced_sata() method.
112f11c7f63SJim Harris  */
113f11c7f63SJim Harris typedef struct SCIC_IO_SATA_PARAMETERS
114f11c7f63SJim Harris {
115f11c7f63SJim Harris    /**
116f11c7f63SJim Harris     * This field indicates whether or not to construct the Scatter-Gather
117f11c7f63SJim Harris     * List elements for the SATA request.  This is used in scenarios
118f11c7f63SJim Harris     * where Scatter-gather-list processing/translation is done by the
119f11c7f63SJim Harris     * user.
120f11c7f63SJim Harris     */
121f11c7f63SJim Harris    BOOL do_translate_sgl;
122f11c7f63SJim Harris 
123f11c7f63SJim Harris } SCIC_IO_SATA_PARAMETERS_T;
124f11c7f63SJim Harris 
125f11c7f63SJim Harris /**
126f11c7f63SJim Harris  * @struct SCIC_PASSTHRU_REQUEST_CALLBACKS
127f11c7f63SJim Harris  * @brief  This structure contains the pointer to the callback functions
128f11c7f63SJim Harris  *         for constructing the passthrough request common to SSP, SMP and STP.
129f11c7f63SJim Harris  *         This structure must be set by the win sci layer before the passthrough
130f11c7f63SJim Harris  *         build is called
131f11c7f63SJim Harris  *
132f11c7f63SJim Harris  */
133f11c7f63SJim Harris typedef struct SCIC_PASSTHRU_REQUEST_CALLBACKS
134f11c7f63SJim Harris {
135f11c7f63SJim Harris    /**
136f11c7f63SJim Harris    * Function pointer to get the phy identifier for passthrough request.
137f11c7f63SJim Harris    */
138f11c7f63SJim Harris    U32 (*scic_cb_passthru_get_phy_identifier) ( void * , U8 *);
139f11c7f63SJim Harris    /**
140f11c7f63SJim Harris    * Function pointer to get the port identifier for passthrough request.
141f11c7f63SJim Harris    */
142f11c7f63SJim Harris    U32 (*scic_cb_passthru_get_port_identifier) ( void * , U8 *);
143f11c7f63SJim Harris    /**
144f11c7f63SJim Harris    * Function pointer to get the connection rate for passthrough request.
145f11c7f63SJim Harris    */
146f11c7f63SJim Harris    U32 (*scic_cb_passthru_get_connection_rate) ( void * , void *);
147f11c7f63SJim Harris    /**
148f11c7f63SJim Harris    * Function pointer to get the destination sas address for passthrough request.
149f11c7f63SJim Harris    */
150f11c7f63SJim Harris    void (*scic_cb_passthru_get_destination_sas_address) (void *, U8 **);
151f11c7f63SJim Harris    /**
152f11c7f63SJim Harris    * Function pointer to get the transfer length for passthrough request.
153f11c7f63SJim Harris    */
154f11c7f63SJim Harris    U32 (*scic_cb_passthru_get_transfer_length) (void *);
155f11c7f63SJim Harris    /**
156f11c7f63SJim Harris    * Function pointer to get the data direction for passthrough request.
157f11c7f63SJim Harris    */
158f11c7f63SJim Harris    U32 (*scic_cb_passthru_get_data_direction) (void *);
159f11c7f63SJim Harris 
160f11c7f63SJim Harris } SCIC_PASSTHRU_REQUEST_CALLBACKS_T;
161f11c7f63SJim Harris 
162f11c7f63SJim Harris /**
163f11c7f63SJim Harris  * @struct SCIC_SSP_PASSTHRU_REQUEST_CALLBACKS
164f11c7f63SJim Harris  * @brief  This structure contains the pointer to the callback functions
165f11c7f63SJim Harris  *         for constructing the passthrough request specific to SSP.
166f11c7f63SJim Harris  *         This structure must be set by the win sci layer before the passthrough
167f11c7f63SJim Harris  *         build is called
168f11c7f63SJim Harris  *
169f11c7f63SJim Harris  */
170f11c7f63SJim Harris typedef struct SCIC_SSP_PASSTHRU_REQUEST_CALLBACKS
171f11c7f63SJim Harris {
172f11c7f63SJim Harris    /**
173f11c7f63SJim Harris    * Common callbacks for all Passthru requests
174f11c7f63SJim Harris    */
175f11c7f63SJim Harris    SCIC_PASSTHRU_REQUEST_CALLBACKS_T common_callbacks;
176f11c7f63SJim Harris    /**
177f11c7f63SJim Harris    * Function pointer to get the lun for passthrough request.
178f11c7f63SJim Harris    */
179f11c7f63SJim Harris    void (* scic_cb_ssp_passthru_get_lun) (void *, U8 **);
180f11c7f63SJim Harris    /**
181f11c7f63SJim Harris    * Function pointer to get the cdb
182f11c7f63SJim Harris    */
183f11c7f63SJim Harris    void (* scic_cb_ssp_passthru_get_cdb) ( void *, U32 *, U8 **, U32 *, U8 ** );
184f11c7f63SJim Harris    /**
185f11c7f63SJim Harris    * Function pointer to get the task attribute for passthrough request.
186f11c7f63SJim Harris    */
187f11c7f63SJim Harris    U32 (*scic_cb_ssp_passthru_get_task_attribute) (void *);
188f11c7f63SJim Harris } SCIC_SSP_PASSTHRU_REQUEST_CALLBACKS_T;
189f11c7f63SJim Harris 
190f11c7f63SJim Harris /**
191f11c7f63SJim Harris  * @struct SCIC_STP_PASSTHRU_REQUEST_CALLBACKS
192f11c7f63SJim Harris  * @brief  This structure contains the pointer to the callback functions
193f11c7f63SJim Harris  *         for constructing the passthrough request specific to STP.
194f11c7f63SJim Harris  *         This structure must be set by the win sci layer before the passthrough
195f11c7f63SJim Harris  *         build is called
196f11c7f63SJim Harris  *
197f11c7f63SJim Harris  */
198f11c7f63SJim Harris typedef struct SCIC_STP_PASSTHRU_REQUEST_CALLBACKS
199f11c7f63SJim Harris {
200f11c7f63SJim Harris    /**
201f11c7f63SJim Harris    * Common callbacks for all Passthru requests
202f11c7f63SJim Harris    */
203f11c7f63SJim Harris    SCIC_PASSTHRU_REQUEST_CALLBACKS_T common_callbacks;
204f11c7f63SJim Harris    /**
205f11c7f63SJim Harris    * Function pointer to get the protocol for passthrough request.
206f11c7f63SJim Harris    */
207f11c7f63SJim Harris    U8 (* scic_cb_stp_passthru_get_protocol) (void *);
208f11c7f63SJim Harris    /**
209f11c7f63SJim Harris    * Function pointer to get the resgister fis
210f11c7f63SJim Harris    */
211f11c7f63SJim Harris    void (* scic_cb_stp_passthru_get_register_fis) ( void *, U8 ** );
212f11c7f63SJim Harris    /**
213f11c7f63SJim Harris    * Function pointer to get the MULTIPLE_COUNT (bits 5,6,7 in Byte 1 in the SAT-specific SCSI extenstion in ATA Pass-through (0x85))
214f11c7f63SJim Harris    */
215f11c7f63SJim Harris    U8 (* scic_cb_stp_passthru_get_multiplecount) ( void *);
216f11c7f63SJim Harris    /**
217f11c7f63SJim Harris    * Function pointer to get the EXTEND (bit 0 in Byte 1 the SAT-specific SCSI extenstion in ATA Pass-through (0x85))
218f11c7f63SJim Harris    */
219f11c7f63SJim Harris    U8 (* scic_cb_stp_passthru_get_extend) ( void *);
220f11c7f63SJim Harris    /**
221f11c7f63SJim Harris    * Function pointer to get the CK_COND (bit 5 in Byte 2 the SAT-specific SCSI extenstion in ATA Pass-through (0x85))
222f11c7f63SJim Harris    */
223f11c7f63SJim Harris    U8 (* scic_cb_stp_passthru_get_ckcond) ( void *);
224f11c7f63SJim Harris    /**
225f11c7f63SJim Harris    * Function pointer to get the T_DIR (bit 3 in Byte 2 the SAT-specific SCSI extenstion in ATA Pass-through (0x85))
226f11c7f63SJim Harris    */
227f11c7f63SJim Harris    U8 (* scic_cb_stp_passthru_get_tdir) ( void *);
228f11c7f63SJim Harris    /**
229f11c7f63SJim Harris    * Function pointer to get the BYTE_BLOCK (bit 2 in Byte 2 the SAT-specific SCSI extenstion in ATA Pass-through (0x85))
230f11c7f63SJim Harris    */
231f11c7f63SJim Harris    U8 (* scic_cb_stp_passthru_get_byteblock) ( void *);
232f11c7f63SJim Harris    /**
233f11c7f63SJim Harris    * Function pointer to get the T_LENGTH (bits 0,1 in Byte 2 the SAT-specific SCSI extenstion in ATA Pass-through (0x85))
234f11c7f63SJim Harris    */
235f11c7f63SJim Harris    U8 (* scic_cb_stp_passthru_get_tlength) ( void *);
236f11c7f63SJim Harris 
237f11c7f63SJim Harris } SCIC_STP_PASSTHRU_REQUEST_CALLBACKS_T;
238f11c7f63SJim Harris 
239f11c7f63SJim Harris /**
240f11c7f63SJim Harris  * @struct SCIC_SMP_PASSTHRU_REQUEST_CALLBACKS
241f11c7f63SJim Harris  * @brief  This structure contains the pointer to the callback functions
242f11c7f63SJim Harris  *         for constructing the passthrough request specific to SMP.
243f11c7f63SJim Harris  *         This structure must be set by the win sci layer before the passthrough
244f11c7f63SJim Harris  *         build is called
245f11c7f63SJim Harris  *
246f11c7f63SJim Harris  */
247f11c7f63SJim Harris typedef struct SCIC_SMP_PASSTHRU_REQUEST_CALLBACKS
248f11c7f63SJim Harris {
249f11c7f63SJim Harris    /**
250f11c7f63SJim Harris    * Common callbacks for all Passthru requests
251f11c7f63SJim Harris    */
252f11c7f63SJim Harris    SCIC_PASSTHRU_REQUEST_CALLBACKS_T common_callbacks;
253f11c7f63SJim Harris 
254f11c7f63SJim Harris    /**
255f11c7f63SJim Harris    * Function pointer to get the length of the smp request and its length
256f11c7f63SJim Harris    */
257f11c7f63SJim Harris    U32 (* scic_cb_smp_passthru_get_request) ( void *, U8 ** );
258f11c7f63SJim Harris    /**
259f11c7f63SJim Harris    * Function pointer to get the frame type of the smp request
260f11c7f63SJim Harris    */
261f11c7f63SJim Harris    U8 (* scic_cb_smp_passthru_get_frame_type) ( void *);
262f11c7f63SJim Harris    /**
26396240c89SEitan Adler    * Function pointer to get the function in the smp request
264f11c7f63SJim Harris    */
265f11c7f63SJim Harris    U8 (* scic_cb_smp_passthru_get_function) ( void * );
266f11c7f63SJim Harris 
267f11c7f63SJim Harris    /**
26896240c89SEitan Adler    * Function pointer to get the "allocated response length" in the smp request
269f11c7f63SJim Harris    */
270f11c7f63SJim Harris    U8 (* scic_cb_smp_passthru_get_allocated_response_length) ( void * );
271f11c7f63SJim Harris 
272f11c7f63SJim Harris } SCIC_SMP_PASSTHRU_REQUEST_CALLBACKS_T;
273f11c7f63SJim Harris 
274f11c7f63SJim Harris /**
275f11c7f63SJim Harris  * @brief This enumeration specifies the transport protocol utilized
276f11c7f63SJim Harris  *        for the request.
277f11c7f63SJim Harris  */
278f11c7f63SJim Harris typedef enum
279f11c7f63SJim Harris {
280f11c7f63SJim Harris    /**
281f11c7f63SJim Harris     * This enumeration constant indicates that no protocol has yet been
282f11c7f63SJim Harris     * set.
283f11c7f63SJim Harris     */
284f11c7f63SJim Harris    SCIC_NO_PROTOCOL,
285f11c7f63SJim Harris 
286f11c7f63SJim Harris    /**
287f11c7f63SJim Harris     * This enumeration constant indicates that the protocol utilized
288f11c7f63SJim Harris     * is the Serial Management Protocol.
289f11c7f63SJim Harris     */
290f11c7f63SJim Harris    SCIC_SMP_PROTOCOL,
291f11c7f63SJim Harris 
292f11c7f63SJim Harris    /**
293f11c7f63SJim Harris     * This enumeration constant indicates that the protocol utilized
294f11c7f63SJim Harris     * is the Serial SCSI Protocol.
295f11c7f63SJim Harris     */
296f11c7f63SJim Harris    SCIC_SSP_PROTOCOL,
297f11c7f63SJim Harris 
298f11c7f63SJim Harris    /**
299f11c7f63SJim Harris     * This enumeration constant indicates that the protocol utilized
300f11c7f63SJim Harris     * is the Serial-ATA Tunneling Protocol.
301f11c7f63SJim Harris     */
302f11c7f63SJim Harris    SCIC_STP_PROTOCOL
303f11c7f63SJim Harris 
304f11c7f63SJim Harris } SCIC_TRANSPORT_PROTOCOL;
305f11c7f63SJim Harris 
306f11c7f63SJim Harris 
307f11c7f63SJim Harris /**
308f11c7f63SJim Harris  * @brief This method simply returns the size required to build an SCI
309f11c7f63SJim Harris  *        based IO request object.
310f11c7f63SJim Harris  *
311f11c7f63SJim Harris  * @return Return the size of the SCI IO request object.
312f11c7f63SJim Harris  */
313f11c7f63SJim Harris U32 scic_io_request_get_object_size(
314f11c7f63SJim Harris    void
315f11c7f63SJim Harris );
316f11c7f63SJim Harris 
317f11c7f63SJim Harris /**
318f11c7f63SJim Harris  * @brief This method is called by the SCI user to construct all SCI Core
319f11c7f63SJim Harris  *        IO requests.  Memory initialization and functionality common to
320f11c7f63SJim Harris  *        all IO request types is performed in this method.
321f11c7f63SJim Harris  *
322f11c7f63SJim Harris  * @note  The SCI core implementation will create an association between
323f11c7f63SJim Harris  *        the user IO request object and the core IO request object.
324f11c7f63SJim Harris  *
325f11c7f63SJim Harris  * @param[in]  scic_controller the handle to the core controller object
326f11c7f63SJim Harris  *             for which to build an IO request.
327f11c7f63SJim Harris  * @param[in]  scic_remote_device the handle to the core remote device
328f11c7f63SJim Harris  *             object for which to build an IO request.
329f11c7f63SJim Harris  * @param[in]  io_tag This parameter specifies the IO tag to be associated
330f11c7f63SJim Harris  *             with this request.  If SCI_CONTROLLER_INVALID_IO_TAG is
331f11c7f63SJim Harris  *             passed, then a copy of the request is built internally.  The
332f11c7f63SJim Harris  *             request will be copied into the actual controller request
333f11c7f63SJim Harris  *             memory when the IO tag is allocated internally during the
334f11c7f63SJim Harris  *             scic_controller_start_io() method.
335f11c7f63SJim Harris  * @param[in]  user_io_request_object This parameter specifies the user
336f11c7f63SJim Harris  *             IO request to be utilized during IO construction.  This IO
337f11c7f63SJim Harris  *             pointer will become the associated object for the core
338f11c7f63SJim Harris  *             IO request object.
339f11c7f63SJim Harris  * @param[in]  scic_io_request_memory This parameter specifies the memory
340f11c7f63SJim Harris  *             location to be utilized when building the core request.
341f11c7f63SJim Harris  * @param[out] new_scic_io_request_handle This parameter specifies a
342f11c7f63SJim Harris  *             pointer to the handle the core will expect in further
343f11c7f63SJim Harris  *             interactions with the core IO request object.
344f11c7f63SJim Harris  *
345f11c7f63SJim Harris  * @return Indicate if the controller successfully built the IO request.
346f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the IO request was
347f11c7f63SJim Harris  *         successfully built.
348f11c7f63SJim Harris  */
349f11c7f63SJim Harris SCI_STATUS scic_io_request_construct(
350f11c7f63SJim Harris    SCI_CONTROLLER_HANDLE_T      scic_controller,
351f11c7f63SJim Harris    SCI_REMOTE_DEVICE_HANDLE_T   scic_remote_device,
352f11c7f63SJim Harris    U16                          io_tag,
353f11c7f63SJim Harris    void                       * user_io_request_object,
354f11c7f63SJim Harris    void                       * scic_io_request_memory,
355f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T    * new_scic_io_request_handle
356f11c7f63SJim Harris );
357f11c7f63SJim Harris 
358f11c7f63SJim Harris /**
359f11c7f63SJim Harris  * @brief This method is called by the SCI user to build an SSP
360f11c7f63SJim Harris  *        IO request.
361f11c7f63SJim Harris  *
362f11c7f63SJim Harris  * @pre
363f11c7f63SJim Harris  *        - The user must have previously called scic_io_request_construct()
364f11c7f63SJim Harris  *          on the supplied IO request.
365f11c7f63SJim Harris  *
366f11c7f63SJim Harris  * @param[in]  scic_io_request This parameter specifies the handle to the
367f11c7f63SJim Harris  *             io request object to be built.
368f11c7f63SJim Harris  *
369f11c7f63SJim Harris  * @return Indicate if the controller successfully built the IO request.
370f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the IO request was
371f11c7f63SJim Harris  *         successfully built.
372f11c7f63SJim Harris  * @retval SCI_FAILURE_UNSUPPORTED_PROTOCOL This value is returned if the
373f11c7f63SJim Harris  *         remote_device does not support the SSP protocol.
374f11c7f63SJim Harris  * @retval SCI_FAILURE_INVALID_ASSOCIATION This value is returned if the
375f11c7f63SJim Harris  *         user did not properly set the association between the SCIC IO
376f11c7f63SJim Harris  *         request and the user's IO request.  Please refer to the
377f11c7f63SJim Harris  *         sci_object_set_association() routine for more
378f11c7f63SJim Harris  *         information.
379f11c7f63SJim Harris  */
380f11c7f63SJim Harris SCI_STATUS scic_io_request_construct_basic_ssp(
381f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request
382f11c7f63SJim Harris );
383f11c7f63SJim Harris 
384f11c7f63SJim Harris /**
385f11c7f63SJim Harris  * @brief This method is called by the SCI user to build an SSP
386f11c7f63SJim Harris  *        IO request with additional parameters that provide additional
387f11c7f63SJim Harris  *        flexibility from the standard scic_io_request_construct_basic_ssp()
388f11c7f63SJim Harris  *        method.
389f11c7f63SJim Harris  *
390f11c7f63SJim Harris  * @pre
391f11c7f63SJim Harris  *        - The user must have previously called scic_io_request_construct()
392f11c7f63SJim Harris  *          on the supplied IO request.
393f11c7f63SJim Harris  *
394f11c7f63SJim Harris  * @param[in]  scic_io_request This parameter specifies the handle to the
395f11c7f63SJim Harris  *             io request object to be built.
396f11c7f63SJim Harris  * @param[in]  io_parameters the additional parameter information to
397f11c7f63SJim Harris  *             be added to the outgoing IO request.
398f11c7f63SJim Harris  *
399f11c7f63SJim Harris  * @return Indicate if the controller successfully built the IO request.
400f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the IO request was
401f11c7f63SJim Harris  *         successfully built.
402f11c7f63SJim Harris  * @retval SCI_FAILURE_UNSUPPORTED_PROTOCOL This value is returned if the
403f11c7f63SJim Harris  *         remote_device does not support the SSP protocol.
404f11c7f63SJim Harris  * @retval SCI_FAILURE_INVALID_ASSOCIATION This value is returned if the
405f11c7f63SJim Harris  *         user did not properly set the association between the SCIC IO
406f11c7f63SJim Harris  *         request and the user's IO request.  Please refer to the
407f11c7f63SJim Harris  *         sci_object_set_association() routine for more
408f11c7f63SJim Harris  *         information.
409f11c7f63SJim Harris  *
410f11c7f63SJim Harris  * @todo Determine the failure situations and return values.
411f11c7f63SJim Harris  */
412f11c7f63SJim Harris SCI_STATUS scic_io_request_construct_advanced_ssp(
413f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T    scic_io_request,
414f11c7f63SJim Harris    SCIC_IO_SSP_PARAMETERS_T * io_parameters
415f11c7f63SJim Harris );
416f11c7f63SJim Harris 
417f11c7f63SJim Harris #if !defined(DISABLE_PASS_THROUGH)
418f11c7f63SJim Harris 
419f11c7f63SJim Harris /**
420f11c7f63SJim Harris  * @brief This method will build an IO request based on the user information
421f11c7f63SJim Harris  *        supplied in the pass-through IO request object.
422f11c7f63SJim Harris  *
423f11c7f63SJim Harris  * @param[in]  scic_io_request This parameter specifies the handle to the
424f11c7f63SJim Harris  *             io request object to be built.
425f11c7f63SJim Harris  *
426f11c7f63SJim Harris  * @param[in]  ssp_passthru_cb This parameter specifies the pointer to
427f11c7f63SJim Harris  *             the structure containing the callback to the function
428f11c7f63SJim Harris  *             pointers to get the needed fields from the pass-through
429f11c7f63SJim Harris  *             reqiest instead of SRB
430f11c7f63SJim Harris  *
431f11c7f63SJim Harris  * @return Indicate if the controller successfully built the IO request.
432f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the IO request was
433f11c7f63SJim Harris  *         successfully built.
434f11c7f63SJim Harris  * @retval SCI_FAILURE_INVALID_ASSOCIATION This value is returned if the
435f11c7f63SJim Harris  *         user did not properly set the association between the SCIC IO
436f11c7f63SJim Harris  *         request and the user's IO request.  Please refer to the
437f11c7f63SJim Harris  *         sci_object_set_association() routine for more
438f11c7f63SJim Harris  *         information.
439f11c7f63SJim Harris  */
440f11c7f63SJim Harris SCI_STATUS scic_io_request_construct_ssp_pass_through(
441f11c7f63SJim Harris    void                       * scic_io_request_memory,
442f11c7f63SJim Harris    SCIC_SSP_PASSTHRU_REQUEST_CALLBACKS_T *ssp_passthru_cb
443f11c7f63SJim Harris );
444f11c7f63SJim Harris 
445f11c7f63SJim Harris #else // !defined(DISABLE_PASS_THROUGH)
446f11c7f63SJim Harris 
447f11c7f63SJim Harris #define scic_io_request_construct_ssp_pass_through(memory, cb) SCI_FAILURE
448f11c7f63SJim Harris 
449f11c7f63SJim Harris #endif // !defined(DISABLE_PASS_THROUGH)
450f11c7f63SJim Harris 
451f11c7f63SJim Harris /**
452f11c7f63SJim Harris  * @brief This method is called by the SCI Core user to build an STP
453f11c7f63SJim Harris  *        IO request.
454f11c7f63SJim Harris  *
455f11c7f63SJim Harris  * @pre
456f11c7f63SJim Harris  *        - The user must have previously called scic_io_request_construct()
457f11c7f63SJim Harris  *          on the supplied IO request.
458f11c7f63SJim Harris  *
459f11c7f63SJim Harris  * @param[in]  scic_io_request This parameter specifies the handle to the
460f11c7f63SJim Harris  *             io request object to be built.
461f11c7f63SJim Harris  *
462f11c7f63SJim Harris  * @return Indicate if the controller successfully built the IO request.
463f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the IO request was
464f11c7f63SJim Harris  *         successfully built.
465f11c7f63SJim Harris  * @retval SCI_FAILURE_UNSUPPORTED_PROTOCOL This value is returned if the
466f11c7f63SJim Harris  *         remote_device does not support the STP protocol.
467f11c7f63SJim Harris  * @retval SCI_FAILURE_INVALID_ASSOCIATION This value is returned if the
468f11c7f63SJim Harris  *         user did not properly set the association between the SCIC IO
469f11c7f63SJim Harris  *         request and the user's IO request.  Please refer to the
470f11c7f63SJim Harris  *         sci_object_set_association() routine for more
471f11c7f63SJim Harris  *         information.
472f11c7f63SJim Harris  */
473f11c7f63SJim Harris SCI_STATUS scic_io_request_construct_basic_sata(
474f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request
475f11c7f63SJim Harris );
476f11c7f63SJim Harris 
477f11c7f63SJim Harris /**
478f11c7f63SJim Harris  * @brief This method is called by the SCI Core user to build an STP
479f11c7f63SJim Harris  *        IO request.
480f11c7f63SJim Harris  *
481f11c7f63SJim Harris  * @pre
482f11c7f63SJim Harris  *        - The user must have previously called scic_io_request_construct()
483f11c7f63SJim Harris  *          on the supplied IO request.
484f11c7f63SJim Harris  *
485f11c7f63SJim Harris  * @param[in]  scic_io_request This parameter specifies the handle to the
486f11c7f63SJim Harris  *             io request object to be built.
487f11c7f63SJim Harris  *
488f11c7f63SJim Harris  * @return Indicate if the controller successfully built the IO request.
489f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the IO request was
490f11c7f63SJim Harris  *         successfully built.
491f11c7f63SJim Harris  * @retval SCI_FAILURE_UNSUPPORTED_PROTOCOL This value is returned if the
492f11c7f63SJim Harris  *         remote_device does not support the STP protocol.
493f11c7f63SJim Harris  * @retval SCI_FAILURE_INVALID_ASSOCIATION This value is returned if the
494f11c7f63SJim Harris  *         user did not properly set the association between the SCIC IO
495f11c7f63SJim Harris  *         request and the user's IO request.  Please refer to the
496f11c7f63SJim Harris  *         sci_object_set_association() routine for more
497f11c7f63SJim Harris  *         information.
498f11c7f63SJim Harris  */
499f11c7f63SJim Harris SCI_STATUS scic_io_request_construct_advanced_sata(
500f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T     scic_io_request,
501f11c7f63SJim Harris    SCIC_IO_SATA_PARAMETERS_T * io_parameters
502f11c7f63SJim Harris );
503f11c7f63SJim Harris 
504f11c7f63SJim Harris #if !defined(DISABLE_PASS_THROUGH)
505f11c7f63SJim Harris 
506f11c7f63SJim Harris /**
507f11c7f63SJim Harris  * @brief This method is called by the SCI user to build an STP pass-through
508f11c7f63SJim Harris  *        IO request.
509f11c7f63SJim Harris  *
510f11c7f63SJim Harris  * @pre
511f11c7f63SJim Harris  *        - The user must have previously called scic_io_request_construct()
512f11c7f63SJim Harris  *          on the supplied IO request.
513f11c7f63SJim Harris  *
514f11c7f63SJim Harris  * @param[in]  scic_io_request This parameter specifies the handle to the
515f11c7f63SJim Harris  *             io request object to be built.
516f11c7f63SJim Harris  *
517f11c7f63SJim Harris  * @param[in]  passthru_cb This parameter specifies the pointer to the callback
518f11c7f63SJim Harris  *             structure that contains the function pointers
519f11c7f63SJim Harris  *
520f11c7f63SJim Harris  * @return Indicate if the controller successfully built the IO request.
521f11c7f63SJim Harris  */
522f11c7f63SJim Harris SCI_STATUS scic_io_request_construct_sata_pass_through(
523f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request,
524f11c7f63SJim Harris    SCIC_STP_PASSTHRU_REQUEST_CALLBACKS_T *passthru_cb
525f11c7f63SJim Harris 
526f11c7f63SJim Harris );
527f11c7f63SJim Harris 
528f11c7f63SJim Harris #else // !defined(DISABLE_PASS_THROUGH)
529f11c7f63SJim Harris 
530f11c7f63SJim Harris #define scic_io_request_construct_sata_pass_through(io, cb) SCI_FAILURE
531f11c7f63SJim Harris 
532f11c7f63SJim Harris #endif // !defined(DISABLE_PASS_THROUGH)
533f11c7f63SJim Harris 
534f11c7f63SJim Harris /**
535f11c7f63SJim Harris  * @brief This method is called by the SCI user to build an SMP
536f11c7f63SJim Harris  *        IO request.
537f11c7f63SJim Harris  *
538f11c7f63SJim Harris  * @pre
539f11c7f63SJim Harris  *        - The user must have previously called scic_io_request_construct()
540f11c7f63SJim Harris  *          on the supplied IO request.
541f11c7f63SJim Harris  *
542f11c7f63SJim Harris  * @param[in]  scic_io_request This parameter specifies the handle to the
543f11c7f63SJim Harris  *             io request object to be built.
544f11c7f63SJim Harris  *
545f11c7f63SJim Harris  * @return Indicate if the controller successfully built the IO request.
546f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the IO request was
547f11c7f63SJim Harris  *         successfully built.
548f11c7f63SJim Harris  * @retval SCI_FAILURE_UNSUPPORTED_PROTOCOL This value is returned if the
549f11c7f63SJim Harris  *         remote_device does not support the SMP protocol.
550f11c7f63SJim Harris  * @retval SCI_FAILURE_INVALID_ASSOCIATION This value is returned if the
551f11c7f63SJim Harris  *         user did not properly set the association between the SCIC IO
552f11c7f63SJim Harris  *         request and the user's IO request.  Please refer to the
553f11c7f63SJim Harris  *         sci_object_set_association() routine for more
554f11c7f63SJim Harris  *         information.
555f11c7f63SJim Harris  */
556f11c7f63SJim Harris SCI_STATUS scic_io_request_construct_smp(
557f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request
558f11c7f63SJim Harris );
559f11c7f63SJim Harris 
560f11c7f63SJim Harris 
561f11c7f63SJim Harris /**
562f11c7f63SJim Harris  * @brief This method is called by the SCI user to build an SMP pass-through
563f11c7f63SJim Harris  *        IO request.
564f11c7f63SJim Harris  *
565f11c7f63SJim Harris  * @pre
566f11c7f63SJim Harris  *        - The user must have previously called scic_io_request_construct()
567f11c7f63SJim Harris  *          on the supplied IO request.
568f11c7f63SJim Harris  *
569f11c7f63SJim Harris  * @param[in]  scic_smp_request This parameter specifies the handle to the
570f11c7f63SJim Harris  *             io request object to be built.
571f11c7f63SJim Harris  *
572f11c7f63SJim Harris  * @param[in]  passthru_cb This parameter specifies the pointer to the callback
573f11c7f63SJim Harris  *             structure that contains the function pointers
574f11c7f63SJim Harris  *
575f11c7f63SJim Harris  * @return Indicate if the controller successfully built the IO request.
576f11c7f63SJim Harris  */
577f11c7f63SJim Harris SCI_STATUS scic_io_request_construct_smp_pass_through(
578f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_smp_request,
579f11c7f63SJim Harris    SCIC_SMP_PASSTHRU_REQUEST_CALLBACKS_T *passthru_cb
580f11c7f63SJim Harris );
581f11c7f63SJim Harris 
582f11c7f63SJim Harris /**
583f11c7f63SJim Harris  * @brief This method returns the controller specific IO/Task request status.
584f11c7f63SJim Harris  *        These status values are unique to the specific controller being
585f11c7f63SJim Harris  *        managed by the SCIC.
586f11c7f63SJim Harris  *
587f11c7f63SJim Harris  * @param[in]  io_request the handle to the IO or task management request
588f11c7f63SJim Harris  *             object for which to retrieve the status.
589f11c7f63SJim Harris  *
590f11c7f63SJim Harris  * @return This method returns a value indicating the controller specific
591f11c7f63SJim Harris  *         request status.
592f11c7f63SJim Harris  */
593f11c7f63SJim Harris U32 scic_request_get_controller_status(
594f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  io_request
595f11c7f63SJim Harris );
596f11c7f63SJim Harris 
597f11c7f63SJim Harris /**
598f11c7f63SJim Harris  * @brief This method returns the user specific IO/Task request status.
599f11c7f63SJim Harris  *
600f11c7f63SJim Harris  * @param[in]  io_request the handle to the IO or task management request
601f11c7f63SJim Harris  *             object for which to retrieve the status.
602f11c7f63SJim Harris  *
603f11c7f63SJim Harris  * @return This method returns a value indicating the user specific
604f11c7f63SJim Harris  *         request status.
605f11c7f63SJim Harris  */
606f11c7f63SJim Harris U32 scic_request_get_sci_status(
607f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  io_request
608f11c7f63SJim Harris );
609f11c7f63SJim Harris 
610f11c7f63SJim Harris 
611f11c7f63SJim Harris /**
612f11c7f63SJim Harris  * @brief This method will return the address to the command information
613f11c7f63SJim Harris  *        unit.
614f11c7f63SJim Harris  *
615f11c7f63SJim Harris  * @param[in]  scic_io_request This parameter specifies the handle to the
616f11c7f63SJim Harris  *             io request object to be built.
617f11c7f63SJim Harris  *
618f11c7f63SJim Harris  * @return The address of the SSP/SMP command information unit.
619f11c7f63SJim Harris  */
620f11c7f63SJim Harris void * scic_io_request_get_command_iu_address(
621f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request
622f11c7f63SJim Harris );
623f11c7f63SJim Harris 
624f11c7f63SJim Harris /**
625f11c7f63SJim Harris  * @brief This method will return the address to the response information
626f11c7f63SJim Harris  *        unit.  For an SSP request this buffer is only valid if the IO
627f11c7f63SJim Harris  *        request is completed with the status SCI_FAILURE_IO_RESPONSE_VALID.
628f11c7f63SJim Harris  *
629f11c7f63SJim Harris  * @param[in]  scic_io_request This parameter specifies the handle to the
630f11c7f63SJim Harris  *             io request object to be built.
631f11c7f63SJim Harris  *
632f11c7f63SJim Harris  * @return The address of the SSP/SMP response information unit.
633f11c7f63SJim Harris  */
634f11c7f63SJim Harris void * scic_io_request_get_response_iu_address(
635f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request
636f11c7f63SJim Harris );
637f11c7f63SJim Harris 
638f11c7f63SJim Harris /**
639f11c7f63SJim Harris  * @brief This method will return the IO tag utilized by the IO request.
640f11c7f63SJim Harris  *
641f11c7f63SJim Harris  * @param[in]  scic_io_request This parameter specifies the handle to the
642f11c7f63SJim Harris  *             io request object for which to return the IO tag.
643f11c7f63SJim Harris  *
644f11c7f63SJim Harris  * @return An unsigned integer representing the IO tag being utilized.
645f11c7f63SJim Harris  * @retval SCI_CONTROLLER_INVALID_IO_TAG This value is returned if the IO
646f11c7f63SJim Harris  *         does not currently have an IO tag allocated to it.
647f11c7f63SJim Harris  * @retval All return other values indicate a legitimate tag.
648f11c7f63SJim Harris  */
649f11c7f63SJim Harris U16 scic_io_request_get_io_tag(
650f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request
651f11c7f63SJim Harris );
652f11c7f63SJim Harris 
653f11c7f63SJim Harris /**
654f11c7f63SJim Harris  * @brief This method will inform the user of the protocol with which
655f11c7f63SJim Harris  *        the supplied IO request was created.
656f11c7f63SJim Harris  *
657f11c7f63SJim Harris  * @param[in]  scic_io_request This parameter specifies the IO request
658f11c7f63SJim Harris  *             for which to retrieve the protocol.
659f11c7f63SJim Harris  *
660f11c7f63SJim Harris  * @return This method returns the transport protocol utilized for the
661f11c7f63SJim Harris  *         the supplied request.  Please refer to SCIC_TRANSPORT_PROTOCOL
662f11c7f63SJim Harris  *         for more information.
663f11c7f63SJim Harris  */
664f11c7f63SJim Harris SCIC_TRANSPORT_PROTOCOL scic_io_request_get_protocol(
665f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request
666f11c7f63SJim Harris );
667f11c7f63SJim Harris 
668f11c7f63SJim Harris /**
669f11c7f63SJim Harris  * @brief This method will assign an NCQ tag to the io request object.  The
670f11c7f63SJim Harris  *        caller of this function must make sure that only valid NCQ tags are
671f11c7f63SJim Harris  *        assigned to the io request object.
672f11c7f63SJim Harris  *
673f11c7f63SJim Harris  * @param[in]  scic_io_request This parameter specifies the handle to the
674f11c7f63SJim Harris  *             io request object to which to assign the ncq tag.
675f11c7f63SJim Harris  * @param[in]  ncq_tag This parameter specifies the NCQ tag to be utilized
676f11c7f63SJim Harris  *             for the supplied core IO request.  It is up to the user to make
677f11c7f63SJim Harris  *             sure that this is a valid NCQ tag.
678f11c7f63SJim Harris  *
679f11c7f63SJim Harris  * @return none
680f11c7f63SJim Harris  *
681f11c7f63SJim Harris  * @note This function is only valid for SATA NCQ requests.
682f11c7f63SJim Harris  */
683f11c7f63SJim Harris void scic_stp_io_request_set_ncq_tag(
684f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request,
685f11c7f63SJim Harris    U16                      ncq_tag
686f11c7f63SJim Harris );
687f11c7f63SJim Harris 
688f11c7f63SJim Harris /**
689f11c7f63SJim Harris  * @brief This method will return the address of the host to device register
690f11c7f63SJim Harris  *        fis region for the io request object.
691f11c7f63SJim Harris  *
692f11c7f63SJim Harris  * @param[in] scic_io_request This parameter specifies the handle to the io
693f11c7f63SJim Harris  *       request object from which to get the host to device register fis
694f11c7f63SJim Harris  *       buffer.
695f11c7f63SJim Harris  *
696f11c7f63SJim Harris  * @return The address of the host to device register fis buffer in the io
697f11c7f63SJim Harris  *         request object.
698f11c7f63SJim Harris  *
699f11c7f63SJim Harris  * @note This function is only valid for SATA requests.
700f11c7f63SJim Harris  */
701f11c7f63SJim Harris void * scic_stp_io_request_get_h2d_reg_address(
702f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request
703f11c7f63SJim Harris );
704f11c7f63SJim Harris 
705f11c7f63SJim Harris /**
706f11c7f63SJim Harris  * @brief This method will return the address of the device to host register
707f11c7f63SJim Harris  *        fis region for the io request object.
708f11c7f63SJim Harris  *
709582212faSEitan Adler  * @param[in] scic_io_request This parameter specifies the handle to the io
710f11c7f63SJim Harris  *       request object from which to get the device to host register fis
711f11c7f63SJim Harris  *       buffer.
712f11c7f63SJim Harris  *
713f11c7f63SJim Harris  * @return The address fo the device to host register fis ending the io
714f11c7f63SJim Harris  *         request.
715f11c7f63SJim Harris  *
716f11c7f63SJim Harris  * @note This function is only valid for SATA requests.
717f11c7f63SJim Harris  */
718f11c7f63SJim Harris void * scic_stp_io_request_get_d2h_reg_address(
719f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request
720f11c7f63SJim Harris );
721f11c7f63SJim Harris 
722f11c7f63SJim Harris /**
723f11c7f63SJim Harris  * @brief This method will return the rx frame for the io request object that
724f11c7f63SJim Harris  *        contains the given offset.
725f11c7f63SJim Harris  *
726f11c7f63SJim Harris  * @param[in] scic_io_request This parameter specifies the handle to the io
727f11c7f63SJim Harris  *       request object which has received the frame data.
728f11c7f63SJim Harris  * @param[in] offset This parameter specifies which frame is being requested.
729f11c7f63SJim Harris  *
730f11c7f63SJim Harris  * @return The return is a pointer to the frame buffer data.
731f11c7f63SJim Harris  *
732f11c7f63SJim Harris  * @note Frame buffers are only 1024 bytes in size.  Reading past the end of a
733f11c7f63SJim Harris  *       frame will have unexpected results.
734f11c7f63SJim Harris  */
735f11c7f63SJim Harris void * scic_io_request_get_rx_frame(
736f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request,
737f11c7f63SJim Harris    U32                      offset
738f11c7f63SJim Harris );
739f11c7f63SJim Harris 
740f11c7f63SJim Harris /**
741f11c7f63SJim Harris  * @brief This method will return the number of bytes transferred from the SCU
742f11c7f63SJim Harris  *
743f11c7f63SJim Harris  * @param[in] scic_io_request This parameter specifies the handle to the io request
744f11c7f63SJim Harris  *            whose data length was not eqaul to the data length specified in the request.
745f11c7f63SJim Harris  *            When the driver gets an early io completion status from the hardware,
746f11c7f63SJim Harris  *            this routine should be called to get the actual number of bytes transferred
747f11c7f63SJim Harris  *
748f11c7f63SJim Harris  * @return The return is the number of bytes transferred when the data legth is not equal to
749f11c7f63SJim Harris  *         the specified length in the io request
750f11c7f63SJim Harris  *
751f11c7f63SJim Harris  */
752f11c7f63SJim Harris U32 scic_io_request_get_number_of_bytes_transferred (
753f11c7f63SJim Harris    SCI_IO_REQUEST_HANDLE_T  scic_io_request
754f11c7f63SJim Harris );
755f11c7f63SJim Harris 
756f11c7f63SJim Harris #ifdef __cplusplus
757f11c7f63SJim Harris }
758f11c7f63SJim Harris #endif // __cplusplus
759f11c7f63SJim Harris 
760f11c7f63SJim Harris #endif // _SCIC_IO_REQUEST_H_
761f11c7f63SJim Harris 
762