1 /*******************************************************************************
2 *Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved.
4 *Redistribution and use in source and binary forms, with or without modification, are permitted provided
5 *that the following conditions are met:
6 *1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
8 *2. Redistributions in binary form must reproduce the above copyright notice,
9 *this list of conditions and the following disclaimer in the documentation and/or other materials provided
10 *with the distribution.
12 *THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 *WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 *FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15 *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 *NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
17 *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18 *LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19 *SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
23 ********************************************************************************/
24 /********************************************************************************
27 * Abstract: This module contains function prototype of the SAT
28 * Module (SM) API callback for initiator.
29 *******************************************************************************/
37 smIORequest_t *smIORequest,
38 smDeviceHandle_t *smDeviceHandle,
43 osGLOBAL FORCEINLINE void
46 smIORequest_t *smIORequest,
49 smSenseData_t *senseData,
50 bit32 interruptContext
55 smDeviceHandle_t *smDeviceHandle,
56 smIntrEventType_t eventType,
61 osGLOBAL FORCEINLINE void
62 tdsmSingleThreadedEnter(
67 osGLOBAL FORCEINLINE void
68 tdsmSingleThreadedLeave(
73 osGLOBAL FORCEINLINE bit8
80 #ifdef LINUX_VERSION_CODE
82 osGLOBAL FORCEINLINE sbit32
83 tdsmInterlockedIncrement(
85 sbit32 volatile *Addend
88 osGLOBAL FORCEINLINE sbit32
89 tdsmInterlockedDecrement(
91 sbit32 volatile *Addend
94 osGLOBAL FORCEINLINE sbit32
97 sbit32 volatile *Destination,
101 osGLOBAL FORCEINLINE sbit32
104 sbit32 volatile *Destination,
108 osGLOBAL FORCEINLINE sbit32
111 sbit32 volatile *Target,
116 osGLOBAL FORCEINLINE sbit32
117 tdsmInterlockedIncrement(
119 sbit32 volatile *Addend
122 osGLOBAL FORCEINLINE sbit32
123 tdsmInterlockedDecrement(
125 sbit32 volatile *Addend
128 osGLOBAL FORCEINLINE sbit32
131 sbit32 volatile *Destination,
135 osGLOBAL FORCEINLINE sbit32
138 sbit32 volatile *Destination,
142 osGLOBAL FORCEINLINE sbit32
143 tdsmInterlockedExchange(
145 sbit32 volatile *Target,
149 #endif /*LINUX_VERSION_CODE*/
156 bit32 * physAddrUpper,
157 bit32 * physAddrLower,
160 smBOOLEAN isCacheable
170 osGLOBAL FORCEINLINE bit32
171 tdsmRotateQnumber(smRoot_t *smRoot,
172 smDeviceHandle_t *smDeviceHandle
176 tdsmSetDeviceQueueDepth(smRoot_t *smRoot,
177 smIORequest_t *smIORequest,
182 #ifndef tdsmLogDebugString
183 GLOBAL void tdsmLogDebugString(
196 osGLOBAL bit32 tdsmGetTransportParam(
210 #endif /* TDSMAPI_H */