Go to the documentation of this file.
56 #ifndef _SCU_TASK_CONTEXT_H_
57 #define _SCU_TASK_CONTEXT_H_
110 #define SCU_TASK_CONTEXT_TYPE 0
111 #define SCU_RNC_CONTEXT_TYPE 1
118 #define SCU_TASK_CONTEXT_INVALID 0
119 #define SCU_TASK_CONTEXT_VALID 1
126 #define SCU_COMMAND_CODE_INITIATOR_NEW_TASK 0
127 #define SCU_COMMAND_CODE_ACTIVE_TASK 1
128 #define SCU_COMMAND_CODE_PRIMITIVE_SEQ_TASK 2
129 #define SCU_COMMAND_CODE_TARGET_RAW_FRAMES 3
141 #define SCU_TASK_PRIORITY_NORMAL 0
150 #define SCU_TASK_PRIORITY_HEAD_OF_Q 1
159 #define SCU_TASK_PRIORITY_HIGH 2
166 #define SCU_TASK_PRIORITY_RESERVED 3
168 #define SCU_TASK_INITIATOR_MODE 1
169 #define SCU_TASK_TARGET_MODE 0
171 #define SCU_TASK_REGULAR 0
172 #define SCU_TASK_ABORTED 1
180 #define SCU_SATA_WRITE_DATA_DIRECTION 0
181 #define SCU_SATA_READ_DATA_DIRECTION 1
189 #define SCU_CONTEXT_COMMAND_REQUEST_TYPE_SHIFT 21
190 #define SCU_CONTEXT_COMMAND_REQUEST_TYPE_MASK 0x00E00000
191 #define scu_get_command_request_type(x) \
192 ((x) & SCU_CONTEXT_COMMAND_REQUEST_TYPE_MASK)
194 #define SCU_CONTEXT_COMMAND_REQUEST_SUBTYPE_SHIFT 18
195 #define SCU_CONTEXT_COMMAND_REQUEST_SUBTYPE_MASK 0x001C0000
196 #define scu_get_command_request_subtype(x) \
197 ((x) & SCU_CONTEXT_COMMAND_REQUEST_SUBTYPE_MASK)
199 #define SCU_CONTEXT_COMMAND_REQUEST_FULLTYPE_MASK \
201 SCU_CONTEXT_COMMAND_REQUEST_TYPE_MASK \
202 | SCU_CONTEXT_COMMAND_REQUEST_SUBTYPE_MASK \
204 #define scu_get_command_request_full_type(x) \
205 ((x) & SCU_CONTEXT_COMMAND_REQUEST_FULLTYPE_MASK)
207 #define SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_SHIFT 16
208 #define SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_MASK 0x00010000
209 #define scu_get_command_protocl_engine_group(x) \
210 ((x) & SCU_CONTEXT_COMMAND_PROTOCOL_ENGINE_GROUP_MASK)
212 #define SCU_CONTEXT_COMMAND_LOGICAL_PORT_SHIFT 12
213 #define SCU_CONTEXT_COMMAND_LOGICAL_PORT_MASK 0x00007000
214 #define scu_get_command_reqeust_logical_port(x) \
215 ((x) & SCU_CONTEXT_COMMAND_LOGICAL_PORT_MASK)
218 #define MAKE_SCU_CONTEXT_COMMAND_TYPE(type) \
219 ((u32)(type) << SCU_CONTEXT_COMMAND_REQUEST_TYPE_SHIFT)
227 #define SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_TC MAKE_SCU_CONTEXT_COMMAND_TYPE(0)
228 #define SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_TC MAKE_SCU_CONTEXT_COMMAND_TYPE(1)
229 #define SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_RNC MAKE_SCU_CONTEXT_COMMAND_TYPE(2)
230 #define SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_RNC MAKE_SCU_CONTEXT_COMMAND_TYPE(3)
231 #define SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC MAKE_SCU_CONTEXT_COMMAND_TYPE(6)
233 #define MAKE_SCU_CONTEXT_COMMAND_REQUEST(type, command) \
234 ((type) | ((command) << SCU_CONTEXT_COMMAND_REQUEST_SUBTYPE_SHIFT))
242 #define SCU_CONTEXT_COMMAND_REQUST_POST_TC \
243 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_TC, 0))
245 #define SCU_CONTEXT_COMMAND_REQUEST_POST_TC_ABORT \
246 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_TC, 1))
248 #define SCU_CONTEXT_COMMAND_REQUST_DUMP_TC \
249 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_TC, 0))
251 #define SCU_CONTEXT_COMMAND_POST_RNC_32 \
252 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_RNC, 0))
254 #define SCU_CONTEXT_COMMAND_POST_RNC_96 \
255 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_RNC, 1))
257 #define SCU_CONTEXT_COMMAND_POST_RNC_INVALIDATE \
258 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_POST_RNC, 2))
260 #define SCU_CONTEXT_COMMAND_DUMP_RNC_32 \
261 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_RNC, 0))
263 #define SCU_CONTEXT_COMMAND_DUMP_RNC_96 \
264 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_DUMP_RNC, 1))
266 #define SCU_CONTEXT_COMMAND_POST_RNC_SUSPEND_TX \
267 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC, 0))
269 #define SCU_CONTEXT_COMMAND_POST_RNC_SUSPEND_TX_RX \
270 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC, 1))
272 #define SCU_CONTEXT_COMMAND_POST_RNC_RESUME \
273 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC, 2))
275 #define SCU_CONTEXT_IT_NEXUS_LOSS_TIMER_ENABLE \
276 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC, 3))
278 #define SCU_CONTEXT_IT_NEXUS_LOSS_TIMER_DISABLE \
279 (MAKE_SCU_CONTEXT_COMMAND_REQUEST(SCU_CONTEXT_COMMAND_REQUEST_TYPE_OTHER_RNC, 4))
287 #define SCU_TASK_CONTEXT_PROTOCOL_SMP 0x00
288 #define SCU_TASK_CONTEXT_PROTOCOL_SSP 0x01
289 #define SCU_TASK_CONTEXT_PROTOCOL_STP 0x02
290 #define SCU_TASK_CONTEXT_PROTOCOL_NONE 0x07
465 #define SCU_SGL_ELEMENT_PAIR_A 0
466 #define SCU_SGL_ELEMENT_PAIR_B 1