diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-05-08 18:49:15 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:47 -0400 |
commit | ce2b3261b6765c3b80fda95426c73e8d3bb1b035 (patch) | |
tree | 98d2007abbe37e70ec29e01cd4752fc04442085f /drivers/scsi/isci/isci.h | |
parent | 67ea838d17acdad3331aeae848683c768df96aaa (diff) |
isci: unify constants
cross driver constants are spread out over multiple header files, consolidate
them into isci.h, and push some includes out to the source files that need
them.
TODO: remove SCI_MODE_SIZE infrastructure.
TODO: task.h is full of inlines that are too large
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/isci.h')
-rw-r--r-- | drivers/scsi/isci/isci.h | 480 |
1 files changed, 464 insertions, 16 deletions
diff --git a/drivers/scsi/isci/isci.h b/drivers/scsi/isci/isci.h index 60c84627c13e..800f2332ecd0 100644 --- a/drivers/scsi/isci/isci.h +++ b/drivers/scsi/isci/isci.h | |||
@@ -56,22 +56,470 @@ | |||
56 | #ifndef __ISCI_H__ | 56 | #ifndef __ISCI_H__ |
57 | #define __ISCI_H__ | 57 | #define __ISCI_H__ |
58 | 58 | ||
59 | #include <linux/kernel.h> | ||
60 | #include <linux/list.h> | ||
61 | #include <linux/types.h> | ||
62 | #include <linux/spinlock.h> | ||
63 | #include <linux/interrupt.h> | 59 | #include <linux/interrupt.h> |
64 | #include <linux/bug.h> | 60 | |
65 | #include <scsi/libsas.h> | 61 | #define DRV_NAME "isci" |
66 | #include <scsi/scsi.h> | 62 | #define SCI_PCI_BAR_COUNT 2 |
67 | 63 | #define SCI_NUM_MSI_X_INT 2 | |
68 | #include "scic_controller.h" | 64 | #define SCI_SMU_BAR 0 |
69 | #include "host.h" | 65 | #define SCI_SMU_BAR_SIZE (16*1024) |
70 | #include "timers.h" | 66 | #define SCI_SCU_BAR 1 |
71 | #include "sci_status.h" | 67 | #define SCI_SCU_BAR_SIZE (4*1024*1024) |
72 | #include "request.h" | 68 | #define SCI_IO_SPACE_BAR0 2 |
73 | #include "task.h" | 69 | #define SCI_IO_SPACE_BAR1 3 |
74 | #include "sata.h" | 70 | #define ISCI_CAN_QUEUE_VAL 250 /* < SCI_MAX_IO_REQUESTS ? */ |
71 | #define SCIC_CONTROLLER_STOP_TIMEOUT 5000 | ||
72 | |||
73 | #define SCI_CONTROLLER_INVALID_IO_TAG 0xFFFF | ||
74 | |||
75 | enum sci_controller_mode { | ||
76 | SCI_MODE_SPEED, | ||
77 | SCI_MODE_SIZE /* deprecated */ | ||
78 | }; | ||
79 | |||
80 | #define SCI_MAX_PHYS (4) | ||
81 | #define SCI_MAX_PORTS SCI_MAX_PHYS | ||
82 | #define SCI_MIN_SMP_PHYS (38) | ||
83 | #define SCI_MAX_SMP_PHYS (384) /* not silicon constrained */ | ||
84 | #define SCI_MAX_REMOTE_DEVICES (256) | ||
85 | #define SCI_MIN_REMOTE_DEVICES (16) | ||
86 | #define SCI_MAX_IO_REQUESTS (256) | ||
87 | #define SCI_MIN_IO_REQUESTS (1) | ||
88 | #define SCI_MAX_MSIX_MESSAGES (2) | ||
89 | #define SCI_MAX_SCATTER_GATHER_ELEMENTS 130 /* not silicon constrained */ | ||
90 | #define SCI_MIN_SCATTER_GATHER_ELEMENTS 1 | ||
91 | #define SCI_MAX_CONTROLLERS 2 | ||
92 | #define SCI_MAX_DOMAINS SCI_MAX_PORTS | ||
93 | |||
94 | /* 2 indicates the maximum number of UFs that can occur for a given IO request. | ||
95 | * The hardware handles reception of additional unsolicited frames while all | ||
96 | * UFs are in use, by holding off the transmitting device. This number could | ||
97 | * be theoretically reduced to 1, but 2 provides for more reliable operation. | ||
98 | * During SATA PIO operation, it is possible under some conditions for there to | ||
99 | * be 3 separate FISes received, back to back to back (PIO Setup, Data, D2H | ||
100 | * Register). It is unlikely to have all 3 pending all at once without some of | ||
101 | * them already being processed. | ||
102 | */ | ||
103 | #define SCU_MIN_UNSOLICITED_FRAMES (1) | ||
104 | #define SCU_MIN_CRITICAL_NOTIFICATIONS (24) | ||
105 | #define SCU_MIN_EVENTS (4) | ||
106 | #define SCU_MIN_COMPLETION_QUEUE_SCRATCH (2) | ||
107 | #define SCU_MIN_COMPLETION_QUEUE_ENTRIES (SCU_MIN_CRITICAL_NOTIFICATIONS \ | ||
108 | + SCU_MIN_EVENTS \ | ||
109 | + SCU_MIN_UNSOLICITED_FRAMES \ | ||
110 | + SCI_MIN_IO_REQUESTS \ | ||
111 | + SCU_MIN_COMPLETION_QUEUE_SCRATCH) | ||
112 | |||
113 | #define SCU_MAX_CRITICAL_NOTIFICATIONS (384) | ||
114 | #define SCU_MAX_EVENTS (128) | ||
115 | #define SCU_MAX_UNSOLICITED_FRAMES (128) | ||
116 | #define SCU_MAX_COMPLETION_QUEUE_SCRATCH (128) | ||
117 | #define SCU_MAX_COMPLETION_QUEUE_ENTRIES (SCU_MAX_CRITICAL_NOTIFICATIONS \ | ||
118 | + SCU_MAX_EVENTS \ | ||
119 | + SCU_MAX_UNSOLICITED_FRAMES \ | ||
120 | + SCI_MAX_IO_REQUESTS \ | ||
121 | + SCU_MAX_COMPLETION_QUEUE_SCRATCH) | ||
122 | |||
123 | #if !defined(ENABLE_MINIMUM_MEMORY_MODE) | ||
124 | #define SCU_UNSOLICITED_FRAME_COUNT SCU_MAX_UNSOLICITED_FRAMES | ||
125 | #define SCU_CRITICAL_NOTIFICATION_COUNT SCU_MAX_CRITICAL_NOTIFICATIONS | ||
126 | #define SCU_EVENT_COUNT SCU_MAX_EVENTS | ||
127 | #define SCU_COMPLETION_QUEUE_SCRATCH SCU_MAX_COMPLETION_QUEUE_SCRATCH | ||
128 | #define SCU_IO_REQUEST_COUNT SCI_MAX_IO_REQUESTS | ||
129 | #define SCU_IO_REQUEST_SGE_COUNT SCI_MAX_SCATTER_GATHER_ELEMENTS | ||
130 | #define SCU_COMPLETION_QUEUE_COUNT SCU_MAX_COMPLETION_QUEUE_ENTRIES | ||
131 | #else | ||
132 | #define SCU_UNSOLICITED_FRAME_COUNT SCU_MIN_UNSOLICITED_FRAMES | ||
133 | #define SCU_CRITICAL_NOTIFICATION_COUNT SCU_MIN_CRITICAL_NOTIFICATIONS | ||
134 | #define SCU_EVENT_COUNT SCU_MIN_EVENTS | ||
135 | #define SCU_COMPLETION_QUEUE_SCRATCH SCU_MIN_COMPLETION_QUEUE_SCRATCH | ||
136 | #define SCU_IO_REQUEST_COUNT SCI_MIN_IO_REQUESTS | ||
137 | #define SCU_IO_REQUEST_SGE_COUNT SCI_MIN_SCATTER_GATHER_ELEMENTS | ||
138 | #define SCU_COMPLETION_QUEUE_COUNT SCU_MIN_COMPLETION_QUEUE_ENTRIES | ||
139 | #endif /* !defined(ENABLE_MINIMUM_MEMORY_OPERATION) */ | ||
140 | |||
141 | /** | ||
142 | * | ||
143 | * | ||
144 | * The SCU_COMPLETION_QUEUE_COUNT constant indicates the size of the completion | ||
145 | * queue into which the hardware DMAs 32-bit quantas (completion entries). | ||
146 | */ | ||
147 | |||
148 | /** | ||
149 | * | ||
150 | * | ||
151 | * This queue must be programmed to a power of 2 size (e.g. 32, 64, 1024, etc.). | ||
152 | */ | ||
153 | #if (SCU_COMPLETION_QUEUE_COUNT != 16) && \ | ||
154 | (SCU_COMPLETION_QUEUE_COUNT != 32) && \ | ||
155 | (SCU_COMPLETION_QUEUE_COUNT != 64) && \ | ||
156 | (SCU_COMPLETION_QUEUE_COUNT != 128) && \ | ||
157 | (SCU_COMPLETION_QUEUE_COUNT != 256) && \ | ||
158 | (SCU_COMPLETION_QUEUE_COUNT != 512) && \ | ||
159 | (SCU_COMPLETION_QUEUE_COUNT != 1024) | ||
160 | #error "SCU_COMPLETION_QUEUE_COUNT must be set to a power of 2." | ||
161 | #endif | ||
162 | |||
163 | #if SCU_MIN_UNSOLICITED_FRAMES > SCU_MAX_UNSOLICITED_FRAMES | ||
164 | #error "Invalid configuration of unsolicited frame constants" | ||
165 | #endif /* SCU_MIN_UNSOLICITED_FRAMES > SCU_MAX_UNSOLICITED_FRAMES */ | ||
166 | |||
167 | #define SCU_MIN_UF_TABLE_ENTRIES (8) | ||
168 | #define SCU_ABSOLUTE_MAX_UNSOLICITED_FRAMES (4096) | ||
169 | #define SCU_UNSOLICITED_FRAME_BUFFER_SIZE (1024) | ||
170 | #define SCU_INVALID_FRAME_INDEX (0xFFFF) | ||
171 | |||
172 | #define SCU_IO_REQUEST_MAX_SGE_SIZE (0x00FFFFFF) | ||
173 | #define SCU_IO_REQUEST_MAX_TRANSFER_LENGTH (0x00FFFFFF) | ||
174 | |||
175 | /* | ||
176 | * Determine the size of the unsolicited frame array including | ||
177 | * unused buffers. */ | ||
178 | #if SCU_UNSOLICITED_FRAME_COUNT <= SCU_MIN_UF_TABLE_ENTRIES | ||
179 | #define SCU_UNSOLICITED_FRAME_CONTROL_ARRAY_SIZE SCU_MIN_UF_TABLE_ENTRIES | ||
180 | #else | ||
181 | #define SCU_UNSOLICITED_FRAME_CONTROL_ARRAY_SIZE SCU_MAX_UNSOLICITED_FRAMES | ||
182 | #endif /* SCU_UNSOLICITED_FRAME_COUNT <= SCU_MIN_UF_TABLE_ENTRIES */ | ||
183 | |||
184 | /** | ||
185 | * enum sci_status - This is the general return status enumeration for non-IO, | ||
186 | * non-task management related SCI interface methods. | ||
187 | * | ||
188 | * | ||
189 | */ | ||
190 | enum sci_status { | ||
191 | /** | ||
192 | * This member indicates successful completion. | ||
193 | */ | ||
194 | SCI_SUCCESS = 0, | ||
195 | |||
196 | /** | ||
197 | * This value indicates that the calling method completed successfully, | ||
198 | * but that the IO may have completed before having it's start method | ||
199 | * invoked. This occurs during SAT translation for requests that do | ||
200 | * not require an IO to the target or for any other requests that may | ||
201 | * be completed without having to submit IO. | ||
202 | */ | ||
203 | SCI_SUCCESS_IO_COMPLETE_BEFORE_START, | ||
204 | |||
205 | /** | ||
206 | * This Value indicates that the SCU hardware returned an early response | ||
207 | * because the io request specified more data than is returned by the | ||
208 | * target device (mode pages, inquiry data, etc.). The completion routine | ||
209 | * will handle this case to get the actual number of bytes transferred. | ||
210 | */ | ||
211 | SCI_SUCCESS_IO_DONE_EARLY, | ||
212 | |||
213 | /** | ||
214 | * This member indicates that the object for which a state change is | ||
215 | * being requested is already in said state. | ||
216 | */ | ||
217 | SCI_WARNING_ALREADY_IN_STATE, | ||
218 | |||
219 | /** | ||
220 | * This member indicates interrupt coalescence timer may cause SAS | ||
221 | * specification compliance issues (i.e. SMP target mode response | ||
222 | * frames must be returned within 1.9 milliseconds). | ||
223 | */ | ||
224 | SCI_WARNING_TIMER_CONFLICT, | ||
225 | |||
226 | /** | ||
227 | * This field indicates a sequence of action is not completed yet. Mostly, | ||
228 | * this status is used when multiple ATA commands are needed in a SATI translation. | ||
229 | */ | ||
230 | SCI_WARNING_SEQUENCE_INCOMPLETE, | ||
231 | |||
232 | /** | ||
233 | * This member indicates that there was a general failure. | ||
234 | */ | ||
235 | SCI_FAILURE, | ||
236 | |||
237 | /** | ||
238 | * This member indicates that the SCI implementation is unable to complete | ||
239 | * an operation due to a critical flaw the prevents any further operation | ||
240 | * (i.e. an invalid pointer). | ||
241 | */ | ||
242 | SCI_FATAL_ERROR, | ||
243 | |||
244 | /** | ||
245 | * This member indicates the calling function failed, because the state | ||
246 | * of the controller is in a state that prevents successful completion. | ||
247 | */ | ||
248 | SCI_FAILURE_INVALID_STATE, | ||
249 | |||
250 | /** | ||
251 | * This member indicates the calling function failed, because there is | ||
252 | * insufficient resources/memory to complete the request. | ||
253 | */ | ||
254 | SCI_FAILURE_INSUFFICIENT_RESOURCES, | ||
255 | |||
256 | /** | ||
257 | * This member indicates the calling function failed, because the | ||
258 | * controller object required for the operation can't be located. | ||
259 | */ | ||
260 | SCI_FAILURE_CONTROLLER_NOT_FOUND, | ||
261 | |||
262 | /** | ||
263 | * This member indicates the calling function failed, because the | ||
264 | * discovered controller type is not supported by the library. | ||
265 | */ | ||
266 | SCI_FAILURE_UNSUPPORTED_CONTROLLER_TYPE, | ||
267 | |||
268 | /** | ||
269 | * This member indicates the calling function failed, because the | ||
270 | * requested initialization data version isn't supported. | ||
271 | */ | ||
272 | SCI_FAILURE_UNSUPPORTED_INIT_DATA_VERSION, | ||
273 | |||
274 | /** | ||
275 | * This member indicates the calling function failed, because the | ||
276 | * requested configuration of SAS Phys into SAS Ports is not supported. | ||
277 | */ | ||
278 | SCI_FAILURE_UNSUPPORTED_PORT_CONFIGURATION, | ||
279 | |||
280 | /** | ||
281 | * This member indicates the calling function failed, because the | ||
282 | * requested protocol is not supported by the remote device, port, | ||
283 | * or controller. | ||
284 | */ | ||
285 | SCI_FAILURE_UNSUPPORTED_PROTOCOL, | ||
286 | |||
287 | /** | ||
288 | * This member indicates the calling function failed, because the | ||
289 | * requested information type is not supported by the SCI implementation. | ||
290 | */ | ||
291 | SCI_FAILURE_UNSUPPORTED_INFORMATION_TYPE, | ||
292 | |||
293 | /** | ||
294 | * This member indicates the calling function failed, because the | ||
295 | * device already exists. | ||
296 | */ | ||
297 | SCI_FAILURE_DEVICE_EXISTS, | ||
298 | |||
299 | /** | ||
300 | * This member indicates the calling function failed, because adding | ||
301 | * a phy to the object is not possible. | ||
302 | */ | ||
303 | SCI_FAILURE_ADDING_PHY_UNSUPPORTED, | ||
304 | |||
305 | /** | ||
306 | * This member indicates the calling function failed, because the | ||
307 | * requested information type is not supported by the SCI implementation. | ||
308 | */ | ||
309 | SCI_FAILURE_UNSUPPORTED_INFORMATION_FIELD, | ||
310 | |||
311 | /** | ||
312 | * This member indicates the calling function failed, because the SCI | ||
313 | * implementation does not support the supplied time limit. | ||
314 | */ | ||
315 | SCI_FAILURE_UNSUPPORTED_TIME_LIMIT, | ||
316 | |||
317 | /** | ||
318 | * This member indicates the calling method failed, because the SCI | ||
319 | * implementation does not contain the specified Phy. | ||
320 | */ | ||
321 | SCI_FAILURE_INVALID_PHY, | ||
322 | |||
323 | /** | ||
324 | * This member indicates the calling method failed, because the SCI | ||
325 | * implementation does not contain the specified Port. | ||
326 | */ | ||
327 | SCI_FAILURE_INVALID_PORT, | ||
328 | |||
329 | /** | ||
330 | * This member indicates the calling method was partly successful | ||
331 | * The port was reset but not all phys in port are operational | ||
332 | */ | ||
333 | SCI_FAILURE_RESET_PORT_PARTIAL_SUCCESS, | ||
334 | |||
335 | /** | ||
336 | * This member indicates that calling method failed | ||
337 | * The port reset did not complete because none of the phys are operational | ||
338 | */ | ||
339 | SCI_FAILURE_RESET_PORT_FAILURE, | ||
340 | |||
341 | /** | ||
342 | * This member indicates the calling method failed, because the SCI | ||
343 | * implementation does not contain the specified remote device. | ||
344 | */ | ||
345 | SCI_FAILURE_INVALID_REMOTE_DEVICE, | ||
346 | |||
347 | /** | ||
348 | * This member indicates the calling method failed, because the remote | ||
349 | * device is in a bad state and requires a reset. | ||
350 | */ | ||
351 | SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED, | ||
352 | |||
353 | /** | ||
354 | * This member indicates the calling method failed, because the SCI | ||
355 | * implementation does not contain or support the specified IO tag. | ||
356 | */ | ||
357 | SCI_FAILURE_INVALID_IO_TAG, | ||
358 | |||
359 | /** | ||
360 | * This member indicates that the operation failed and the user should | ||
361 | * check the response data associated with the IO. | ||
362 | */ | ||
363 | SCI_FAILURE_IO_RESPONSE_VALID, | ||
364 | |||
365 | /** | ||
366 | * This member indicates that the operation failed, the failure is | ||
367 | * controller implementation specific, and the response data associated | ||
368 | * with the request is not valid. You can query for the controller | ||
369 | * specific error information via scic_controller_get_request_status() | ||
370 | */ | ||
371 | SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR, | ||
372 | |||
373 | /** | ||
374 | * This member indicated that the operation failed because the | ||
375 | * user requested this IO to be terminated. | ||
376 | */ | ||
377 | SCI_FAILURE_IO_TERMINATED, | ||
378 | |||
379 | /** | ||
380 | * This member indicates that the operation failed and the associated | ||
381 | * request requires a SCSI abort task to be sent to the target. | ||
382 | */ | ||
383 | SCI_FAILURE_IO_REQUIRES_SCSI_ABORT, | ||
384 | |||
385 | /** | ||
386 | * This member indicates that the operation failed because the supplied | ||
387 | * device could not be located. | ||
388 | */ | ||
389 | SCI_FAILURE_DEVICE_NOT_FOUND, | ||
390 | |||
391 | /** | ||
392 | * This member indicates that the operation failed because the | ||
393 | * objects association is required and is not correctly set. | ||
394 | */ | ||
395 | SCI_FAILURE_INVALID_ASSOCIATION, | ||
396 | |||
397 | /** | ||
398 | * This member indicates that the operation failed, because a timeout | ||
399 | * occurred. | ||
400 | */ | ||
401 | SCI_FAILURE_TIMEOUT, | ||
402 | |||
403 | /** | ||
404 | * This member indicates that the operation failed, because the user | ||
405 | * specified a value that is either invalid or not supported. | ||
406 | */ | ||
407 | SCI_FAILURE_INVALID_PARAMETER_VALUE, | ||
408 | |||
409 | /** | ||
410 | * This value indicates that the operation failed, because the number | ||
411 | * of messages (MSI-X) is not supported. | ||
412 | */ | ||
413 | SCI_FAILURE_UNSUPPORTED_MESSAGE_COUNT, | ||
414 | |||
415 | /** | ||
416 | * This value indicates that the method failed due to a lack of | ||
417 | * available NCQ tags. | ||
418 | */ | ||
419 | SCI_FAILURE_NO_NCQ_TAG_AVAILABLE, | ||
420 | |||
421 | /** | ||
422 | * This value indicates that a protocol violation has occurred on the | ||
423 | * link. | ||
424 | */ | ||
425 | SCI_FAILURE_PROTOCOL_VIOLATION, | ||
426 | |||
427 | /** | ||
428 | * This value indicates a failure condition that retry may help to clear. | ||
429 | */ | ||
430 | SCI_FAILURE_RETRY_REQUIRED, | ||
431 | |||
432 | /** | ||
433 | * This field indicates the retry limit was reached when a retry is attempted | ||
434 | */ | ||
435 | SCI_FAILURE_RETRY_LIMIT_REACHED, | ||
436 | |||
437 | /** | ||
438 | * This member indicates the calling method was partly successful. | ||
439 | * Mostly, this status is used when a LUN_RESET issued to an expander attached | ||
440 | * STP device in READY NCQ substate needs to have RNC suspended/resumed | ||
441 | * before posting TC. | ||
442 | */ | ||
443 | SCI_FAILURE_RESET_DEVICE_PARTIAL_SUCCESS, | ||
444 | |||
445 | /** | ||
446 | * This field indicates an illegal phy connection based on the routing attribute | ||
447 | * of both expander phy attached to each other. | ||
448 | */ | ||
449 | SCI_FAILURE_ILLEGAL_ROUTING_ATTRIBUTE_CONFIGURATION, | ||
450 | |||
451 | /** | ||
452 | * This field indicates a CONFIG ROUTE INFO command has a response with function result | ||
453 | * INDEX DOES NOT EXIST, usually means exceeding max route index. | ||
454 | */ | ||
455 | SCI_FAILURE_EXCEED_MAX_ROUTE_INDEX, | ||
456 | |||
457 | /** | ||
458 | * This value indicates that an unsupported PCI device ID has been | ||
459 | * specified. This indicates that attempts to invoke | ||
460 | * scic_library_allocate_controller() will fail. | ||
461 | */ | ||
462 | SCI_FAILURE_UNSUPPORTED_PCI_DEVICE_ID | ||
463 | |||
464 | }; | ||
465 | |||
466 | /** | ||
467 | * enum sci_io_status - This enumeration depicts all of the possible IO | ||
468 | * completion status values. Each value in this enumeration maps directly | ||
469 | * to a value in the enum sci_status enumeration. Please refer to that | ||
470 | * enumeration for detailed comments concerning what the status represents. | ||
471 | * | ||
472 | * Add the API to retrieve the SCU status from the core. Check to see that the | ||
473 | * following status are properly handled: - SCI_IO_FAILURE_UNSUPPORTED_PROTOCOL | ||
474 | * - SCI_IO_FAILURE_INVALID_IO_TAG | ||
475 | */ | ||
476 | enum sci_io_status { | ||
477 | SCI_IO_SUCCESS = SCI_SUCCESS, | ||
478 | SCI_IO_FAILURE = SCI_FAILURE, | ||
479 | SCI_IO_SUCCESS_COMPLETE_BEFORE_START = SCI_SUCCESS_IO_COMPLETE_BEFORE_START, | ||
480 | SCI_IO_SUCCESS_IO_DONE_EARLY = SCI_SUCCESS_IO_DONE_EARLY, | ||
481 | SCI_IO_FAILURE_INVALID_STATE = SCI_FAILURE_INVALID_STATE, | ||
482 | SCI_IO_FAILURE_INSUFFICIENT_RESOURCES = SCI_FAILURE_INSUFFICIENT_RESOURCES, | ||
483 | SCI_IO_FAILURE_UNSUPPORTED_PROTOCOL = SCI_FAILURE_UNSUPPORTED_PROTOCOL, | ||
484 | SCI_IO_FAILURE_RESPONSE_VALID = SCI_FAILURE_IO_RESPONSE_VALID, | ||
485 | SCI_IO_FAILURE_CONTROLLER_SPECIFIC_ERR = SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR, | ||
486 | SCI_IO_FAILURE_TERMINATED = SCI_FAILURE_IO_TERMINATED, | ||
487 | SCI_IO_FAILURE_REQUIRES_SCSI_ABORT = SCI_FAILURE_IO_REQUIRES_SCSI_ABORT, | ||
488 | SCI_IO_FAILURE_INVALID_PARAMETER_VALUE = SCI_FAILURE_INVALID_PARAMETER_VALUE, | ||
489 | SCI_IO_FAILURE_NO_NCQ_TAG_AVAILABLE = SCI_FAILURE_NO_NCQ_TAG_AVAILABLE, | ||
490 | SCI_IO_FAILURE_PROTOCOL_VIOLATION = SCI_FAILURE_PROTOCOL_VIOLATION, | ||
491 | |||
492 | SCI_IO_FAILURE_REMOTE_DEVICE_RESET_REQUIRED = SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED, | ||
493 | |||
494 | SCI_IO_FAILURE_RETRY_REQUIRED = SCI_FAILURE_RETRY_REQUIRED, | ||
495 | SCI_IO_FAILURE_RETRY_LIMIT_REACHED = SCI_FAILURE_RETRY_LIMIT_REACHED, | ||
496 | SCI_IO_FAILURE_INVALID_REMOTE_DEVICE = SCI_FAILURE_INVALID_REMOTE_DEVICE | ||
497 | }; | ||
498 | |||
499 | /** | ||
500 | * enum sci_task_status - This enumeration depicts all of the possible task | ||
501 | * completion status values. Each value in this enumeration maps directly | ||
502 | * to a value in the enum sci_status enumeration. Please refer to that | ||
503 | * enumeration for detailed comments concerning what the status represents. | ||
504 | * | ||
505 | * Check to see that the following status are properly handled: | ||
506 | */ | ||
507 | enum sci_task_status { | ||
508 | SCI_TASK_SUCCESS = SCI_SUCCESS, | ||
509 | SCI_TASK_FAILURE = SCI_FAILURE, | ||
510 | SCI_TASK_FAILURE_INVALID_STATE = SCI_FAILURE_INVALID_STATE, | ||
511 | SCI_TASK_FAILURE_INSUFFICIENT_RESOURCES = SCI_FAILURE_INSUFFICIENT_RESOURCES, | ||
512 | SCI_TASK_FAILURE_UNSUPPORTED_PROTOCOL = SCI_FAILURE_UNSUPPORTED_PROTOCOL, | ||
513 | SCI_TASK_FAILURE_INVALID_TAG = SCI_FAILURE_INVALID_IO_TAG, | ||
514 | SCI_TASK_FAILURE_RESPONSE_VALID = SCI_FAILURE_IO_RESPONSE_VALID, | ||
515 | SCI_TASK_FAILURE_CONTROLLER_SPECIFIC_ERR = SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR, | ||
516 | SCI_TASK_FAILURE_TERMINATED = SCI_FAILURE_IO_TERMINATED, | ||
517 | SCI_TASK_FAILURE_INVALID_PARAMETER_VALUE = SCI_FAILURE_INVALID_PARAMETER_VALUE, | ||
518 | |||
519 | SCI_TASK_FAILURE_REMOTE_DEVICE_RESET_REQUIRED = SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED, | ||
520 | SCI_TASK_FAILURE_RESET_DEVICE_PARTIAL_SUCCESS = SCI_FAILURE_RESET_DEVICE_PARTIAL_SUCCESS | ||
521 | |||
522 | }; | ||
75 | 523 | ||
76 | extern unsigned char no_outbound_task_to; | 524 | extern unsigned char no_outbound_task_to; |
77 | extern u16 ssp_max_occ_to; | 525 | extern u16 ssp_max_occ_to; |
@@ -85,9 +533,9 @@ irqreturn_t isci_msix_isr(int vec, void *data); | |||
85 | irqreturn_t isci_intx_isr(int vec, void *data); | 533 | irqreturn_t isci_intx_isr(int vec, void *data); |
86 | irqreturn_t isci_error_isr(int vec, void *data); | 534 | irqreturn_t isci_error_isr(int vec, void *data); |
87 | 535 | ||
536 | struct scic_sds_controller; | ||
88 | bool scic_sds_controller_isr(struct scic_sds_controller *scic); | 537 | bool scic_sds_controller_isr(struct scic_sds_controller *scic); |
89 | void scic_sds_controller_completion_handler(struct scic_sds_controller *scic); | 538 | void scic_sds_controller_completion_handler(struct scic_sds_controller *scic); |
90 | bool scic_sds_controller_error_isr(struct scic_sds_controller *scic); | 539 | bool scic_sds_controller_error_isr(struct scic_sds_controller *scic); |
91 | void scic_sds_controller_error_handler(struct scic_sds_controller *scic); | 540 | void scic_sds_controller_error_handler(struct scic_sds_controller *scic); |
92 | |||
93 | #endif /* __ISCI_H__ */ | 541 | #endif /* __ISCI_H__ */ |