xref: /freebsd/sys/dev/isci/scil/sati_callbacks.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 _SATI_CALLBACKS_H_
55f11c7f63SJim Harris #define _SATI_CALLBACKS_H_
56f11c7f63SJim Harris 
57f11c7f63SJim Harris /**
58f11c7f63SJim Harris  * @file
59f11c7f63SJim Harris  * @brief This file contains the default callback bindings for SATI.  These
60f11c7f63SJim Harris  *        must be overridden by the SATI user to ensure successful operation.
61f11c7f63SJim Harris  */
62f11c7f63SJim Harris 
63f11c7f63SJim Harris #include <dev/isci/scil/sati_types.h>
64f11c7f63SJim Harris #include <dev/isci/scil/intel_sas.h>
65f11c7f63SJim Harris 
66f11c7f63SJim Harris #ifdef SATI_DEFAULT_DECLARATION
67f11c7f63SJim Harris 
68f11c7f63SJim Harris /**
69f11c7f63SJim Harris  * @brief This callback method asks the user to provide the address for
70f11c7f63SJim Harris  *        the command descriptor block (CDB) associated with this IO request.
71f11c7f63SJim Harris  *
72f11c7f63SJim Harris  * @param[in] scsi_io This parameter points to the user's IO request object
73f11c7f63SJim Harris  *            It is a cookie that allows the user to provide the necessary
74f11c7f63SJim Harris  *            information for this callback.
75f11c7f63SJim Harris  *
76f11c7f63SJim Harris  * @return This method returns the virtual address of the CDB.
77f11c7f63SJim Harris  */
78f11c7f63SJim Harris void * sati_cb_get_cdb_address(
79f11c7f63SJim Harris    void * scsi_io
80f11c7f63SJim Harris );
81f11c7f63SJim Harris 
82f11c7f63SJim Harris /**
83f11c7f63SJim Harris  * @brief This callback method asks the user to provide the length of
84f11c7f63SJim Harris  *        the command descriptor block (CDB) associated with this IO request.
85f11c7f63SJim Harris  *
86f11c7f63SJim Harris  * @param[in] scsi_io This parameter points to the user's IO request object.
87f11c7f63SJim Harris  *            It is a cookie that allows the user to provide the necessary
88f11c7f63SJim Harris  *            information for this callback.
89f11c7f63SJim Harris  *
90f11c7f63SJim Harris  * @return This method returns the length of the CDB.
91f11c7f63SJim Harris  */
92f11c7f63SJim Harris U32 sati_cb_get_cdb_length(
93f11c7f63SJim Harris    void * scsi_io
94f11c7f63SJim Harris );
95f11c7f63SJim Harris 
96f11c7f63SJim Harris /**
97f11c7f63SJim Harris  * @brief This callback method asks the user to provide the data transfer
98f11c7f63SJim Harris  *        direction of this IO request.
99f11c7f63SJim Harris  *
100f11c7f63SJim Harris  * @param[in] scsi_io This parameter points to the user's IO request object.
101f11c7f63SJim Harris  *            It is a cookie that allows the user to provide the necessary
102f11c7f63SJim Harris  *            information for this callback.
103f11c7f63SJim Harris  * @param[in] io_direction to return
104f11c7f63SJim Harris  * @return This method returns the length of the CDB.
105f11c7f63SJim Harris  */
106f11c7f63SJim Harris void sati_cb_get_data_direction(
107f11c7f63SJim Harris    void * scsi_io,
108f11c7f63SJim Harris    U8 * io_direction
109f11c7f63SJim Harris );
110f11c7f63SJim Harris 
111f11c7f63SJim Harris /**
112f11c7f63SJim Harris  * @brief This callback method sets a value into the data buffer associated
113f11c7f63SJim Harris  *        with the supplied user SCSI IO request at the supplied byte offset.
114f11c7f63SJim Harris  *
115f11c7f63SJim Harris  * @note SATI does not manage the user scatter-gather-list.  As a result,
116f11c7f63SJim Harris  *       the user must ensure that data is written according to the SGL.
117f11c7f63SJim Harris  *
118f11c7f63SJim Harris  * @param[in]  scsi_io This parameter specifies the user's SCSI IO request
119f11c7f63SJim Harris  *             for which to set the data buffer byte.
120f11c7f63SJim Harris  * @param[in]  byte_offset This parameter specifies the offset into the
121f11c7f63SJim Harris  *             data buffer at which to set the value.
122f11c7f63SJim Harris  * @param[in]  value This parameter specifies the new value to be set into
123f11c7f63SJim Harris  *             the data buffer.
124f11c7f63SJim Harris  *
125f11c7f63SJim Harris  * @return none
126f11c7f63SJim Harris  */
127f11c7f63SJim Harris void sati_cb_set_data_byte(
128f11c7f63SJim Harris    void * scsi_io,
129f11c7f63SJim Harris    U32    byte_offset,
130f11c7f63SJim Harris    U8     value
131f11c7f63SJim Harris );
132f11c7f63SJim Harris 
133f11c7f63SJim Harris /**
134f11c7f63SJim Harris  * @brief This callback method gets a value from the data buffer associated
135f11c7f63SJim Harris  *        with the supplied user SCSI IO request at the supplied byte offset.
136f11c7f63SJim Harris  *
137f11c7f63SJim Harris  * @note SATI does not manage the user scatter-gather-list.  As a result,
138f11c7f63SJim Harris  *       the user must ensure that data is written according to the SGL.
139f11c7f63SJim Harris  *
140f11c7f63SJim Harris  * @param[in]  scsi_io This parameter specifies the user's SCSI IO request
141f11c7f63SJim Harris  *             for which to get the data buffer byte.
142f11c7f63SJim Harris  * @param[in]  byte_offset This parameter specifies the offset into the
143f11c7f63SJim Harris  *             data buffer at which to get the value.
144f11c7f63SJim Harris  * @param[in]  value This parameter specifies the new value to be get into
145f11c7f63SJim Harris  *             the data buffer.
146f11c7f63SJim Harris  *
147f11c7f63SJim Harris  * @return none
148f11c7f63SJim Harris  */
149f11c7f63SJim Harris void sati_cb_get_data_byte(
150f11c7f63SJim Harris    void * scsi_io,
151f11c7f63SJim Harris    U32    byte_offset,
152f11c7f63SJim Harris    U8   * value
153f11c7f63SJim Harris );
154f11c7f63SJim Harris 
155f11c7f63SJim Harris /**
15696240c89SEitan Adler  * @brief This callback method gets the task type for the SCSI task
157f11c7f63SJim Harris  *        request.
158f11c7f63SJim Harris  *
159f11c7f63SJim Harris  * @param[in] scsi_task This parameter specifies the user's SCSI Task request.
160f11c7f63SJim Harris  *            It is a cookie that allows the user to provide the necessary
161f11c7f63SJim Harris  *            information for this callback.
162f11c7f63SJim Harris  *
163f11c7f63SJim Harris  * @return This method returns one of the enumeration values for
164f11c7f63SJim Harris  *         SCSI_TASK_MGMT_REQUEST_CODES
165f11c7f63SJim Harris  */
166f11c7f63SJim Harris U8 sati_cb_get_task_function(
167f11c7f63SJim Harris    void * scsi_task
168f11c7f63SJim Harris );
169f11c7f63SJim Harris 
170f11c7f63SJim Harris #ifdef SATI_TRANSPORT_SUPPORTS_SAS
171f11c7f63SJim Harris /**
172f11c7f63SJim Harris  * @brief This callback method retrieves the address of the user's SSP
173f11c7f63SJim Harris  *        response IU buffer.
174f11c7f63SJim Harris  *
175f11c7f63SJim Harris  * @param[in]  scsi_io This parameter specifies the user's SCSI IO request
176453130d9SPedro F. Giffuni  *             for which to retrieve the location of the response buffer to
177f11c7f63SJim Harris  *             be written.
178f11c7f63SJim Harris  *
179f11c7f63SJim Harris  * @return This method returns the address of the response data buffer.
180f11c7f63SJim Harris  */
181f11c7f63SJim Harris void * sati_cb_get_response_iu_address(
182f11c7f63SJim Harris    void * scsi_io
183f11c7f63SJim Harris );
184f11c7f63SJim Harris 
185f11c7f63SJim Harris #else // SATI_TRANSPORT_SUPPORTS_SAS
186f11c7f63SJim Harris 
187f11c7f63SJim Harris /**
188f11c7f63SJim Harris  * @brief This callback method retrieves the address of the user's sense data
189f11c7f63SJim Harris  *        buffer.
190f11c7f63SJim Harris  *
191f11c7f63SJim Harris  * @param[in]  scsi_io This parameter specifies the user's SCSI IO request
192453130d9SPedro F. Giffuni  *             for which to retrieve the location of the sense buffer to
193f11c7f63SJim Harris  *             be written.
194f11c7f63SJim Harris  *
195f11c7f63SJim Harris  * @return This method returns the address of the sense data buffer.
196f11c7f63SJim Harris  */
197f11c7f63SJim Harris U8* sati_cb_get_sense_data_address(
198f11c7f63SJim Harris    void * scsi_io
199f11c7f63SJim Harris );
200f11c7f63SJim Harris 
201f11c7f63SJim Harris /**
202f11c7f63SJim Harris  * @brief This callback method retrieves the length of the user's sense data
203f11c7f63SJim Harris  *        buffer.
204f11c7f63SJim Harris  *
205f11c7f63SJim Harris  * @param[in]  scsi_io This parameter specifies the user's SCSI IO request
206453130d9SPedro F. Giffuni  *             for which to retrieve the location of the sense buffer to
207f11c7f63SJim Harris  *             be written.
208f11c7f63SJim Harris  *
209f11c7f63SJim Harris  * @return This method returns the length of the sense data buffer.
210f11c7f63SJim Harris  */
211f11c7f63SJim Harris U32 sati_cb_get_sense_data_length(
212f11c7f63SJim Harris    void * scsi_io
213f11c7f63SJim Harris );
214f11c7f63SJim Harris 
215f11c7f63SJim Harris /**
216f11c7f63SJim Harris  * @brief This callback method sets the SCSI status to be associated with
217f11c7f63SJim Harris  *        the supplied user's SCSI IO request.
218f11c7f63SJim Harris  *
219f11c7f63SJim Harris  * @param[in]  scsi_io This parameter specifies the user's SCSI IO request
220f11c7f63SJim Harris  *             for which to set the SCSI status.
221f11c7f63SJim Harris  * @param[in]  status This parameter specifies the SCSI status to be
222f11c7f63SJim Harris  *             associated with the supplied user's SCSI IO request.
223f11c7f63SJim Harris  *
224f11c7f63SJim Harris  * @return none
225f11c7f63SJim Harris  */
226f11c7f63SJim Harris void sati_cb_set_scsi_status(
227f11c7f63SJim Harris    void * scsi_io,
228f11c7f63SJim Harris    U8     status
229f11c7f63SJim Harris );
230f11c7f63SJim Harris 
231f11c7f63SJim Harris #endif // SATI_TRANSPORT_SUPPORTS_SAS
232f11c7f63SJim Harris 
233f11c7f63SJim Harris /**
234f11c7f63SJim Harris  * @brief This method retrieves the ATA task file (register FIS) relating to
235f11c7f63SJim Harris  *        the host to device command values.
236f11c7f63SJim Harris  *
237f11c7f63SJim Harris  * @param[in] ata_io This parameter specifies the user's ATA IO request
238f11c7f63SJim Harris  *            from which to retrieve the h2d register FIS address.
239f11c7f63SJim Harris  *
240f11c7f63SJim Harris  * @return This method returns the address for the host to device register
241f11c7f63SJim Harris  *         FIS.
242f11c7f63SJim Harris  */
243f11c7f63SJim Harris U8 * sati_cb_get_h2d_register_fis_address(
244f11c7f63SJim Harris    void * ata_io
245f11c7f63SJim Harris );
246f11c7f63SJim Harris 
247f11c7f63SJim Harris /**
248f11c7f63SJim Harris  * @brief This method retrieves the ATA task file (register FIS) relating to
249453130d9SPedro F. Giffuni  *        the device to host response values.
250f11c7f63SJim Harris  *
251f11c7f63SJim Harris  * @param[in] ata_io This parameter specifies the user's ATA IO request
252f11c7f63SJim Harris  *            from which to retrieve the d2h register FIS address.
253f11c7f63SJim Harris  *
254f11c7f63SJim Harris  * @return This method returns the address for the device to host register
255f11c7f63SJim Harris  *         FIS.
256f11c7f63SJim Harris  */
257f11c7f63SJim Harris U8 * sati_cb_get_d2h_register_fis_address(
258f11c7f63SJim Harris    void * ata_io
259f11c7f63SJim Harris );
260f11c7f63SJim Harris 
261f11c7f63SJim Harris /**
262f11c7f63SJim Harris  * @brief This method retrieves the address where the ATA data received
263f11c7f63SJim Harris  *        from the device is stored.
264f11c7f63SJim Harris  *
265f11c7f63SJim Harris  * @param[in] ata_io This parameter specifies the user's ATA IO request
266f11c7f63SJim Harris  *            from which to retrieve the received data address.
267f11c7f63SJim Harris  *
268f11c7f63SJim Harris  * @return This method returns the address for the data received from
269f11c7f63SJim Harris  *         the remote device.
270f11c7f63SJim Harris  */
271f11c7f63SJim Harris void * sati_cb_get_ata_data_address(
272f11c7f63SJim Harris    void * ata_io
273f11c7f63SJim Harris );
274f11c7f63SJim Harris 
275f11c7f63SJim Harris /**
276f11c7f63SJim Harris  * @brief This method allocates a DMA buffer
277f11c7f63SJim Harris  *        that can be utilized for small (<=4K) DMA sequences.
278f11c7f63SJim Harris  *        This is utilized to translate SCSI UNMAP requests.
279f11c7f63SJim Harris  *
280f11c7f63SJim Harris  * @param[in]  scsi_io This parameter specifies the user's SCSI IO request
281f11c7f63SJim Harris  *             for which to set the SCSI status.
282f11c7f63SJim Harris  * @param[in] length in bytes of the buffer to be allocated
283f11c7f63SJim Harris  * @param[in] virtual address of the allocated DMA buffer.
284f11c7f63SJim Harris  * @param[in] low 32 bits of the physical DMA address.
285f11c7f63SJim Harris  * @param[in] high 32 bits of the physical DMA address.
286f11c7f63SJim Harris  *
287f11c7f63SJim Harris  * @return This method returns the virtual and physical address
288f11c7f63SJim Harris  *         of the allocated DMA buffer.
289f11c7f63SJim Harris  */
290f11c7f63SJim Harris void sati_cb_allocate_dma_buffer(
291f11c7f63SJim Harris    void *  scsi_io,
292f11c7f63SJim Harris    U32     length,
293f11c7f63SJim Harris    void ** virt_address,
294f11c7f63SJim Harris    U32  *  phys_address_low,
295f11c7f63SJim Harris    U32  *  phys_address_high
296f11c7f63SJim Harris );
297f11c7f63SJim Harris 
298f11c7f63SJim Harris /**
299f11c7f63SJim Harris  * @brief This method frees a previously allocated DMA buffer
300f11c7f63SJim Harris  *
301f11c7f63SJim Harris  * @param[in]  scsi_io This parameter specifies the user's SCSI IO request
302f11c7f63SJim Harris  *             for which to set the SCSI status.
303f11c7f63SJim Harris  * @param[in] address - write buffer address being freed
304f11c7f63SJim Harris  *
305f11c7f63SJim Harris  * @return This method returns the address for the data received from
306f11c7f63SJim Harris  *         the remote device.
307f11c7f63SJim Harris  */
308f11c7f63SJim Harris void sati_cb_free_dma_buffer(
309f11c7f63SJim Harris    void * scsi_io,
310f11c7f63SJim Harris    void * virt_address
311f11c7f63SJim Harris );
312f11c7f63SJim Harris 
313f11c7f63SJim Harris /**
314f11c7f63SJim Harris  * @brief This method retrieves a pointer to the next scatter gather
315f11c7f63SJim Harris  *        list element.
316f11c7f63SJim Harris  *
317f11c7f63SJim Harris  * @param[in] scsi_io This parameter specifies the user's SCSI IO request
318f11c7f63SJim Harris  *            from which to retrieve the scatter gather list.
319f11c7f63SJim Harris  * @param[in] ata_io This parameter specifies the user's ATA IO request
320f11c7f63SJim Harris  *            from which to retrieve the scatter gather list.
321f11c7f63SJim Harris  * @param[in] current_sge This parameter specifies the current SG element
322f11c7f63SJim Harris  *            being pointed to.  If retrieving the first element,
323f11c7f63SJim Harris  *            then this value should be NULL.
324f11c7f63SJim Harris  * @param[in] next_sge This parameter is the returned SGL element
325f11c7f63SJim Harris  *            based on current_sge.
326f11c7f63SJim Harris  *
327f11c7f63SJim Harris  * @return This method returns a pointer to the scatter gather element.
328f11c7f63SJim Harris  */
329f11c7f63SJim Harris void sati_cb_sgl_next_sge(
330f11c7f63SJim Harris    void * scsi_io,
331f11c7f63SJim Harris    void * ata_io,
332f11c7f63SJim Harris    void * current_sge,
333f11c7f63SJim Harris    void ** next_sge
334f11c7f63SJim Harris );
335f11c7f63SJim Harris 
336f11c7f63SJim Harris /**
337f11c7f63SJim Harris  * @brief This method will set the next scatter-gather elements address
338f11c7f63SJim Harris  *        low field.
339f11c7f63SJim Harris  *
340f11c7f63SJim Harris  * @param[in] current_sge This parameter specifies the current SG element
341f11c7f63SJim Harris  *            being pointed to.
342f11c7f63SJim Harris  * @param[in] address_low This parameter specifies the lower 32-bits
343f11c7f63SJim Harris  *            of address to be programmed into the SG element.
344f11c7f63SJim Harris  * @param[in] address_high This parameter specifies the upper 32-bits
345f11c7f63SJim Harris  *            of address to be programmed into the SG element.
346f11c7f63SJim Harris  * @param[in] length This parameter specifies the number of bytes
347f11c7f63SJim Harris  *            to be programmed into the SG element.
348f11c7f63SJim Harris  *
349f11c7f63SJim Harris  * @return none
350f11c7f63SJim Harris  */
351f11c7f63SJim Harris void sati_cb_sge_write(
352f11c7f63SJim Harris    void * current_sge,
353f11c7f63SJim Harris    U32    phys_address_low,
354f11c7f63SJim Harris    U32    phys_address_high,
355f11c7f63SJim Harris    U32    byte_length
356f11c7f63SJim Harris );
357f11c7f63SJim Harris 
358f11c7f63SJim Harris /**
359f11c7f63SJim Harris  * @brief This method will check to see if the translation requires
360f11c7f63SJim Harris  *        a translation response callback.  Some translations need to be alerted on all
361f11c7f63SJim Harris  *        failures so sequence cleanup can be completed for halting the translation.
362f11c7f63SJim Harris  *
363f11c7f63SJim Harris  * @param[in] the current SCIC request under going translation.
364f11c7f63SJim Harris  *
365f11c7f63SJim Harris  * @return TRUE A response callback will be required to complete this translation sequence.
366f11c7f63SJim Harris  */
367f11c7f63SJim Harris BOOL sati_cb_do_translate_response(
368f11c7f63SJim Harris    void * request
369f11c7f63SJim Harris );
370f11c7f63SJim Harris 
371f11c7f63SJim Harris /**
372f11c7f63SJim Harris  * @brief This method retrieves the SAS address for the device associated
373f11c7f63SJim Harris  *        with the supplied SCSI IO request.  This method assumes that the
374f11c7f63SJim Harris  *        associated device is contained in a SAS Domain.
375f11c7f63SJim Harris  *
376f11c7f63SJim Harris  * @param[in]  scsi_io This parameter specifies the user's SCSI IO request
377453130d9SPedro F. Giffuni  *             for which to retrieve the SAS address of the device.
378f11c7f63SJim Harris  * @param[out] sas_address This parameter specifies the SAS address memory
379f11c7f63SJim Harris  *             to be contain the retrieved value.
380f11c7f63SJim Harris  *
381f11c7f63SJim Harris  * @return none
382f11c7f63SJim Harris  */
383f11c7f63SJim Harris void sati_cb_device_get_sas_address(
384f11c7f63SJim Harris    void              * scsi_io,
385f11c7f63SJim Harris    SCI_SAS_ADDRESS_T * sas_address
386f11c7f63SJim Harris );
387f11c7f63SJim Harris 
388f11c7f63SJim Harris /**
389f11c7f63SJim Harris  * @brief In this method the user is expected to log the supplied
390f11c7f63SJim Harris  *        error information.  The user must be capable of handling variable
391f11c7f63SJim Harris  *        length argument lists and should consider prepending the fact
392f11c7f63SJim Harris  *        that this is an error from the core.
393f11c7f63SJim Harris  *
394f11c7f63SJim Harris  * @param[in]  logger_object This parameter specifies the logger object
395f11c7f63SJim Harris  *             associated with this message.
396f11c7f63SJim Harris  * @param[in]  log_object_mask This parameter specifies the log objects
397f11c7f63SJim Harris  *             for which this message is being generated.
398f11c7f63SJim Harris  * @param[in]  log_message This parameter specifies the message to be logged.
399f11c7f63SJim Harris  *
400f11c7f63SJim Harris  * @return none
401f11c7f63SJim Harris  */
402f11c7f63SJim Harris void sati_cb_logger_log_error(
403f11c7f63SJim Harris    void                * logger_object,
404f11c7f63SJim Harris    U32                   log_object_mask,
405f11c7f63SJim Harris    char                * log_message,
406f11c7f63SJim Harris    ...
407f11c7f63SJim Harris );
408f11c7f63SJim Harris 
409f11c7f63SJim Harris /**
410f11c7f63SJim Harris  * @brief In this method the user is expected to log the supplied warning
411f11c7f63SJim Harris  *        information.  The user must be capable of handling variable
412f11c7f63SJim Harris  *        length argument lists and should consider prepending the fact
413f11c7f63SJim Harris  *        that this is a warning from the core.
414f11c7f63SJim Harris  *
415f11c7f63SJim Harris  * @param[in]  logger_object This parameter specifies the logger object
416f11c7f63SJim Harris  *             associated with this message.
417f11c7f63SJim Harris  * @param[in]  log_object_mask This parameter specifies the log objects
418f11c7f63SJim Harris  *             for which this message is being generated.
419f11c7f63SJim Harris  * @param[in]  log_message This parameter specifies the message to be logged.
420f11c7f63SJim Harris  *
421f11c7f63SJim Harris  * @return none
422f11c7f63SJim Harris  */
423f11c7f63SJim Harris void sati_cb_logger_log_warning(
424f11c7f63SJim Harris    void                * logger_object,
425f11c7f63SJim Harris    U32                   log_object_mask,
426f11c7f63SJim Harris    char                * log_message,
427f11c7f63SJim Harris    ...
428f11c7f63SJim Harris );
429f11c7f63SJim Harris 
430f11c7f63SJim Harris /**
431f11c7f63SJim Harris  * @brief In this method the user is expected to log the supplied debug
432f11c7f63SJim Harris  *        information.  The user must be capable of handling variable
433f11c7f63SJim Harris  *        length argument lists and should consider prepending the fact
434f11c7f63SJim Harris  *        that this is a debug message from the core.
435f11c7f63SJim Harris  *
436f11c7f63SJim Harris  * @param[in]  logger_object This parameter specifies the logger object
437f11c7f63SJim Harris  *             associated with this message.
438f11c7f63SJim Harris  * @param[in]  log_object_mask This parameter specifies the log objects
439f11c7f63SJim Harris  *             for which this message is being generated.
440f11c7f63SJim Harris  * @param[in]  log_message This parameter specifies the message to be logged.
441f11c7f63SJim Harris  *
442f11c7f63SJim Harris  * @return none
443f11c7f63SJim Harris  */
444f11c7f63SJim Harris void sati_cb_logger_log_info(
445f11c7f63SJim Harris    void                * logger_object,
446f11c7f63SJim Harris    U32                   log_object_mask,
447f11c7f63SJim Harris    char                * log_message,
448f11c7f63SJim Harris    ...
449f11c7f63SJim Harris );
450f11c7f63SJim Harris 
451f11c7f63SJim Harris /**
452f11c7f63SJim Harris  * @brief In this method the user is expected to log the supplied function
453f11c7f63SJim Harris  *        trace information.  The user must be capable of handling variable
454f11c7f63SJim Harris  *        length argument lists and should consider prepending the fact
455f11c7f63SJim Harris  *        that this is a function trace (i.e. entry/exit) message from the
456f11c7f63SJim Harris  *        core.
457f11c7f63SJim Harris  *
458f11c7f63SJim Harris  * @param[in]  logger_object This parameter specifies the logger object
459f11c7f63SJim Harris  *             associated with this message.
460f11c7f63SJim Harris  * @param[in]  log_object_mask This parameter specifies the log objects
461f11c7f63SJim Harris  *             for which this message is being generated.
462f11c7f63SJim Harris  * @param[in]  log_message This parameter specifies the message to be logged.
463f11c7f63SJim Harris  *
464f11c7f63SJim Harris  * @return none
465f11c7f63SJim Harris  */
466f11c7f63SJim Harris void sati_cb_logger_log_trace(
467f11c7f63SJim Harris    void                * logger_object,
468f11c7f63SJim Harris    U32                   log_object_mask,
469f11c7f63SJim Harris    char                * log_message,
470f11c7f63SJim Harris    ...
471f11c7f63SJim Harris );
472f11c7f63SJim Harris 
473f11c7f63SJim Harris #include <dev/isci/scil/sati_callbacks_implementation.h>
474f11c7f63SJim Harris 
475f11c7f63SJim Harris #else // SATI_DEFAULT_DECLARATION
476f11c7f63SJim Harris 
477f11c7f63SJim Harris #include <dev/isci/scil/scif_sas_sati_binding.h>
478f11c7f63SJim Harris #endif // SATI_DEFAULT_DECLARATION
479f11c7f63SJim Harris 
480f11c7f63SJim Harris #endif // _SATI_CALLBACKS_H_
481f11c7f63SJim Harris 
482