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 /*******************************************************************************/
28 * The file contaning function protoptype used by SAT layer.
32 #ifndef __SATPROTO_H__
33 #define __SATPROTO_H__
36 /*****************************************************************************
37 *! \brief itdsatProcessAbnormalCompletion
39 * This routine is called to complete error case for SATA request previously
40 * issued to the LL Layer in saSATAStart()
42 * \param agRoot: Handles for this instance of SAS/SATA hardware
43 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
44 * \param agIOStatus: Status of completed I/O.
45 * \param agSATAParm1: Additional info based on status.
46 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
48 * \param satIOContext: Pointer to satIOContext_t.
52 *****************************************************************************/
53 void itdsatProcessAbnormalCompletion(
55 agsaIORequest_t *agIORequest,
57 agsaFisHeader_t *agFirstDword,
59 agsaFrameHandle_t agFrameHandle,
60 satIOContext_t *satIOContext
62 void itdsatDelayedProcessAbnormalCompletion(
64 agsaIORequest_t *agIORequest,
66 agsaFisHeader_t *agFirstDword,
68 agsaFrameHandle_t agFrameHandle,
69 satIOContext_t *satIOContext
72 void itdsatErrorSATAEventHandle(
74 agsaIORequest_t *agIORequest,
75 agsaPortContext_t *agPortContext,
76 agsaDevHandle_t *agDevHandle,
78 satIOContext_t *ioContext
81 void itdsatEncryptionHandler (
83 agsaIORequest_t *agIORequest,
93 agsaIORequest_t *agIORequest,
100 void satProcessAbort(
102 tiIORequest_t *tiIORequest,
103 satIOContext_t *satIOContext
105 /*****************************************************************************/
106 /*! \brief Setup up the SCSI Sense response.
108 * This function is used to setup up the Sense Data payload for
109 * CHECK CONDITION status.
111 * \param pSense: Pointer to the scsiRspSense_t sense data structure.
112 * \param SnsKey: SCSI Sense Key.
113 * \param SnsInfo: SCSI Sense Info.
114 * \param SnsCode: SCSI Sense Code.
118 /*****************************************************************************/
120 void satSetSensePayload( scsiRspSense_t *pSense,
124 satIOContext_t *satIOContext);
127 /*****************************************************************************/
128 /*! \brief Setup up the SCSI Sense response.
130 * This function is used to setup up the Sense Data payload for
131 * CHECK CONDITION status.
133 * \param pSense: Pointer to the scsiRspSense_t sense data structure.
134 * \param SnsKey: SCSI Sense Key.
135 * \param SnsInfo: SCSI Sense Info.
136 * \param SnsCode: SCSI Sense Code.
140 /*****************************************************************************/
142 void satSetDeferredSensePayload( scsiRspSense_t *pSense,
146 satIOContext_t *satIOContext
149 /*****************************************************************************/
150 /*! \brief SAT implementation for ATAPI Packet Command.
152 * SAT implementation for ATAPI Packet and send FIS request to LL layer.
154 * \param tiRoot: Pointer to TISA initiator driver/port instance.
155 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
156 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
157 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
158 * \param satIOContext_t: Pointer to the SAT IO Context
160 * \return If command is started successfully
161 * - \e tiSuccess: I/O request successfully initiated.
162 * - \e tiBusy: No resources available, try again later.
163 * - \e tiIONoDevice: Invalid device handle.
164 * - \e tiError: Other errors.
166 /*****************************************************************************/
167 GLOBAL bit32 satPacket(
169 tiIORequest_t *tiIORequest,
170 tiDeviceHandle_t *tiDeviceHandle,
171 tiScsiInitiatorRequest_t *tiScsiRequest,
172 satIOContext_t *satIOContext);
176 agsaIORequest_t *agIORequest,
178 agsaFisHeader_t *agFirstDword,
183 /*****************************************************************************/
184 /*! \brief SAT implementation for satDeviceReset.
186 * This function creates DEVICE RESET fis and sends the request to LL layer
188 * \param tiRoot: Pointer to TISA initiator driver/port instance.
189 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
190 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
191 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
192 * \param satIOContext_t: Pointer to the SAT IO Context
194 * \return If command is started successfully
195 * - \e tiSuccess: I/O request successfully initiated.
196 * - \e tiBusy: No resources available, try again later.
197 * - \e tiIONoDevice: Invalid device handle.
198 * - \e tiError: Other errors.
200 /*****************************************************************************/
201 GLOBAL bit32 satDeviceReset(
203 tiIORequest_t *tiIORequest,
204 tiDeviceHandle_t *tiDeviceHandle,
205 tiScsiInitiatorRequest_t *tiScsiRequest,
206 satIOContext_t *satIOContext
209 void satDeviceResetCB(
211 agsaIORequest_t *agIORequest,
213 agsaFisHeader_t *agFirstDword,
219 /*****************************************************************************/
220 /*! \brief SAT implementation for satExecuteDeviceDiagnostic.
222 * This function creates Execute Device Diagnostic fis and sends the request to LL layer
224 * \param tiRoot: Pointer to TISA initiator driver/port instance.
225 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
226 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
227 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
228 * \param satIOContext_t: Pointer to the SAT IO Context
230 * \return If command is started successfully
231 * - \e tiSuccess: I/O request successfully initiated.
232 * - \e tiBusy: No resources available, try again later.
233 * - \e tiIONoDevice: Invalid device handle.
234 * - \e tiError: Other errors.
236 /*****************************************************************************/
237 GLOBAL bit32 satExecuteDeviceDiagnostic(
239 tiIORequest_t *tiIORequest,
240 tiDeviceHandle_t *tiDeviceHandle,
241 tiScsiInitiatorRequest_t *tiScsiRequest,
242 satIOContext_t *satIOContext
245 void satExecuteDeviceDiagnosticCB(
247 agsaIORequest_t *agIORequest,
249 agsaFisHeader_t *agFirstDword,
255 /*****************************************************************************/
256 /*! \brief SAT implementation for satSetFeatures.
258 * This function creates SetFeatures fis and sends the request to LL layer
260 * \param tiRoot: Pointer to TISA initiator driver/port instance.
261 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
262 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
263 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
264 * \param satIOContext_t: Pointer to the SAT IO Context
266 * \return If command is started successfully
267 * - \e tiSuccess: I/O request successfully initiated.
268 * - \e tiBusy: No resources available, try again later.
269 * - \e tiIONoDevice: Invalid device handle.
270 * - \e tiError: Other errors.
272 /*****************************************************************************/
273 GLOBAL bit32 satSetFeatures(
275 tiIORequest_t *tiIORequest,
276 tiDeviceHandle_t *tiDeviceHandle,
277 tiScsiInitiatorRequest_t *tiScsiRequest,
278 satIOContext_t *satIOContext,
281 void satSetFeaturesPIOCB(
283 agsaIORequest_t *agIORequest,
285 agsaFisHeader_t *agFirstDword,
291 void satSetFeaturesCB(
293 agsaIORequest_t *agIORequest,
295 agsaFisHeader_t *agFirstDword,
300 /*****************************************************************************/
301 /*! \brief SAT implementation for SCSI REQUEST SENSE to ATAPI device.
303 * SAT implementation for SCSI REQUEST SENSE.
305 * \param tiRoot: Pointer to TISA initiator driver/port instance.
306 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
307 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
308 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
309 * \param satIOContext_t: Pointer to the SAT IO Context
311 * \return If command is started successfully
312 * - \e tiSuccess: I/O request successfully initiated.
313 * - \e tiBusy: No resources available, try again later.
314 * - \e tiIONoDevice: Invalid device handle.
315 * - \e tiError: Other errors.
317 /*****************************************************************************/
318 GLOBAL bit32 satRequestSenseForATAPI(
320 tiIORequest_t *tiIORequest,
321 tiDeviceHandle_t *tiDeviceHandle,
322 tiScsiInitiatorRequest_t *tiScsiRequest,
323 satIOContext_t *satIOContext);
325 void satRequestSenseForATAPICB(
327 agsaIORequest_t *agIORequest,
329 agsaFisHeader_t *agFirstDword,
335 /*****************************************************************************/
336 /*! \brief SAT implementation for SCSI READ12.
338 * SAT implementation for SCSI READ12 and send FIS request to LL layer.
340 * \param tiRoot: Pointer to TISA initiator driver/port instance.
341 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
342 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
343 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
344 * \param satIOContext_t: Pointer to the SAT IO Context
346 * \return If command is started successfully
347 * - \e tiSuccess: I/O request successfully initiated.
348 * - \e tiBusy: No resources available, try again later.
349 * - \e tiIONoDevice: Invalid device handle.
350 * - \e tiError: Other errors.
352 /*****************************************************************************/
353 GLOBAL bit32 satRead12(
355 tiIORequest_t *tiIORequest,
356 tiDeviceHandle_t *tiDeviceHandle,
357 tiScsiInitiatorRequest_t *tiScsiRequest,
358 satIOContext_t *satIOContext);
360 /*****************************************************************************/
361 /*! \brief SAT implementation for SCSI READ10.
363 * SAT implementation for SCSI READ10 and send FIS request to LL layer.
365 * \param tiRoot: Pointer to TISA initiator driver/port instance.
366 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
367 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
368 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
369 * \param satIOContext_t: Pointer to the SAT IO Context
371 * \return If command is started successfully
372 * - \e tiSuccess: I/O request successfully initiated.
373 * - \e tiBusy: No resources available, try again later.
374 * - \e tiIONoDevice: Invalid device handle.
375 * - \e tiError: Other errors.
377 /*****************************************************************************/
378 GLOBAL bit32 satRead10(
380 tiIORequest_t *tiIORequest,
381 tiDeviceHandle_t *tiDeviceHandle,
382 tiScsiInitiatorRequest_t *tiScsiRequest,
383 satIOContext_t *satIOContext);
386 /*****************************************************************************/
387 /*! \brief SAT implementation for SCSI READ16.
389 * SAT implementation for SCSI READ16 and send FIS request to LL layer.
391 * \param tiRoot: Pointer to TISA initiator driver/port instance.
392 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
393 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
394 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
395 * \param satIOContext_t: Pointer to the SAT IO Context
397 * \return If command is started successfully
398 * - \e tiSuccess: I/O request successfully initiated.
399 * - \e tiBusy: No resources available, try again later.
400 * - \e tiIONoDevice: Invalid device handle.
401 * - \e tiError: Other errors.
403 /*****************************************************************************/
404 GLOBAL bit32 satRead16(
406 tiIORequest_t *tiIORequest,
407 tiDeviceHandle_t *tiDeviceHandle,
408 tiScsiInitiatorRequest_t *tiScsiRequest,
409 satIOContext_t *satIOContext);
410 /*****************************************************************************/
411 /*! \brief SAT implementation for SCSI READ6.
413 * SAT implementation for SCSI READ6 and send FIS request to LL layer.
415 * \param tiRoot: Pointer to TISA initiator driver/port instance.
416 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
417 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
418 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
419 * \param satIOContext_t: Pointer to the SAT IO Context
421 * \return If command is started successfully
422 * - \e tiSuccess: I/O request successfully initiated.
423 * - \e tiBusy: No resources available, try again later.
424 * - \e tiIONoDevice: Invalid device handle.
425 * - \e tiError: Other errors.
427 /*****************************************************************************/
428 GLOBAL bit32 satRead6(
430 tiIORequest_t *tiIORequest,
431 tiDeviceHandle_t *tiDeviceHandle,
432 tiScsiInitiatorRequest_t *tiScsiRequest,
433 satIOContext_t *satIOContext);
435 /*****************************************************************************/
436 /*! \brief SAT implementation for SCSI WRITE16.
438 * SAT implementation for SCSI WRITE16 and send FIS request to LL layer.
440 * \param tiRoot: Pointer to TISA initiator driver/port instance.
441 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
442 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
443 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
444 * \param satIOContext_t: Pointer to the SAT IO Context
446 * \return If command is started successfully
447 * - \e tiSuccess: I/O request successfully initiated.
448 * - \e tiBusy: No resources available, try again later.
449 * - \e tiIONoDevice: Invalid device handle.
450 * - \e tiError: Other errors.
452 /*****************************************************************************/
453 GLOBAL bit32 satWrite16(
455 tiIORequest_t *tiIORequest,
456 tiDeviceHandle_t *tiDeviceHandle,
457 tiScsiInitiatorRequest_t *tiScsiRequest,
458 satIOContext_t *satIOContext);
460 /*****************************************************************************/
461 /*! \brief SAT implementation for SCSI WRITE12.
463 * SAT implementation for SCSI WRITE12 and send FIS request to LL layer.
465 * \param tiRoot: Pointer to TISA initiator driver/port instance.
466 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
467 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
468 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
469 * \param satIOContext_t: Pointer to the SAT IO Context
471 * \return If command is started successfully
472 * - \e tiSuccess: I/O request successfully initiated.
473 * - \e tiBusy: No resources available, try again later.
474 * - \e tiIONoDevice: Invalid device handle.
475 * - \e tiError: Other errors.
477 /*****************************************************************************/
478 GLOBAL bit32 satWrite12(
480 tiIORequest_t *tiIORequest,
481 tiDeviceHandle_t *tiDeviceHandle,
482 tiScsiInitiatorRequest_t *tiScsiRequest,
483 satIOContext_t *satIOContext);
485 /*****************************************************************************/
486 /*! \brief SAT implementation for SCSI WRITE10.
488 * SAT implementation for SCSI WRITE10 and send FIS request to LL layer.
490 * \param tiRoot: Pointer to TISA initiator driver/port instance.
491 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
492 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
493 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
494 * \param satIOContext_t: Pointer to the SAT IO Context
496 * \return If command is started successfully
497 * - \e tiSuccess: I/O request successfully initiated.
498 * - \e tiBusy: No resources available, try again later.
499 * - \e tiIONoDevice: Invalid device handle.
500 * - \e tiError: Other errors.
502 /*****************************************************************************/
503 GLOBAL bit32 satWrite10(
505 tiIORequest_t *tiIORequest,
506 tiDeviceHandle_t *tiDeviceHandle,
507 tiScsiInitiatorRequest_t *tiScsiRequest,
508 satIOContext_t *satIOContext);
509 GLOBAL bit32 satWrite_1(
511 tiIORequest_t *tiIORequest,
512 tiDeviceHandle_t *tiDeviceHandle,
513 tiScsiInitiatorRequest_t *tiScsiRequest,
514 satIOContext_t *satIOContext);
517 /*****************************************************************************/
518 /*! \brief SAT implementation for SCSI WRITE6.
520 * SAT implementation for SCSI WRITE6 and send FIS request to LL layer.
522 * \param tiRoot: Pointer to TISA initiator driver/port instance.
523 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
524 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
525 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
526 * \param satIOContext_t: Pointer to the SAT IO Context
528 * \return If command is started successfully
529 * - \e tiSuccess: I/O request successfully initiated.
530 * - \e tiBusy: No resources available, try again later.
531 * - \e tiIONoDevice: Invalid device handle.
532 * - \e tiError: Other errors.
534 /*****************************************************************************/
535 GLOBAL bit32 satWrite6(
537 tiIORequest_t *tiIORequest,
538 tiDeviceHandle_t *tiDeviceHandle,
539 tiScsiInitiatorRequest_t *tiScsiRequest,
540 satIOContext_t *satIOContext);
543 /*****************************************************************************/
544 /*! \brief SAT implementation for SCSI satReportLun.
546 * SAT implementation for SCSI satReportLun. Only LUN0 is reported.
548 * \param tiRoot: Pointer to TISA initiator driver/port instance.
549 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
550 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
551 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
552 * \param satIOContext_t: Pointer to the SAT IO Context
554 * \return If command is started successfully
555 * - \e tiSuccess: I/O request successfully initiated.
556 * - \e tiBusy: No resources available, try again later.
557 * - \e tiIONoDevice: Invalid device handle.
558 * - \e tiError: Other errors.
560 /*****************************************************************************/
561 GLOBAL bit32 satReportLun(
563 tiIORequest_t *tiIORequest,
564 tiDeviceHandle_t *tiDeviceHandle,
565 tiScsiInitiatorRequest_t *tiScsiRequest,
566 satIOContext_t *satIOContext);
569 /*****************************************************************************/
570 /*! \brief SAT implementation for SCSI satReadCapacity10.
572 * SAT implementation for SCSI satReadCapacity10.
574 * \param tiRoot: Pointer to TISA initiator driver/port instance.
575 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
576 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
577 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
578 * \param satIOContext_t: Pointer to the SAT IO Context
580 * \return If command is started successfully
581 * - \e tiSuccess: I/O request successfully initiated.
582 * - \e tiBusy: No resources available, try again later.
583 * - \e tiIONoDevice: Invalid device handle.
584 * - \e tiError: Other errors.
586 /*****************************************************************************/
587 GLOBAL bit32 satReadCapacity10(
589 tiIORequest_t *tiIORequest,
590 tiDeviceHandle_t *tiDeviceHandle,
591 tiScsiInitiatorRequest_t *tiScsiRequest,
592 satIOContext_t *satIOContext);
594 /*****************************************************************************/
595 /*! \brief SAT implementation for SCSI satReadCapacity16.
597 * SAT implementation for SCSI satReadCapacity16.
599 * \param tiRoot: Pointer to TISA initiator driver/port instance.
600 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
601 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
602 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
603 * \param satIOContext_t: Pointer to the SAT IO Context
605 * \return If command is started successfully
606 * - \e tiSuccess: I/O request successfully initiated.
607 * - \e tiBusy: No resources available, try again later.
608 * - \e tiIONoDevice: Invalid device handle.
609 * - \e tiError: Other errors.
611 /*****************************************************************************/
612 GLOBAL bit32 satReadCapacity16(
614 tiIORequest_t *tiIORequest,
615 tiDeviceHandle_t *tiDeviceHandle,
616 tiScsiInitiatorRequest_t *tiScsiRequest,
617 satIOContext_t *satIOContext);
620 GLOBAL bit32 satInquiry(
622 tiIORequest_t *tiIORequest,
623 tiDeviceHandle_t *tiDeviceHandle,
624 tiScsiInitiatorRequest_t *tiScsiRequest,
625 satIOContext_t *satIOContext);
627 /*****************************************************************************/
628 /*! \brief SAT implementation for SCSI REQUEST SENSE.
630 * SAT implementation for SCSI REQUEST SENSE.
632 * \param tiRoot: Pointer to TISA initiator driver/port instance.
633 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
634 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
635 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
636 * \param satIOContext_t: Pointer to the SAT IO Context
638 * \return If command is started successfully
639 * - \e tiSuccess: I/O request successfully initiated.
640 * - \e tiBusy: No resources available, try again later.
641 * - \e tiIONoDevice: Invalid device handle.
642 * - \e tiError: Other errors.
644 /*****************************************************************************/
645 GLOBAL bit32 satRequestSense(
647 tiIORequest_t *tiIORequest,
648 tiDeviceHandle_t *tiDeviceHandle,
649 tiScsiInitiatorRequest_t *tiScsiRequest,
650 satIOContext_t *satIOContext);
651 /*****************************************************************************/
652 /*! \brief SAT implementation for SCSI REQUEST SENSE.
654 * SAT implementation for SCSI REQUEST SENSE.
655 * Sub function of satRequestSense
657 * \param tiRoot: Pointer to TISA initiator driver/port instance.
658 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
659 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
660 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
661 * \param satIOContext_t: Pointer to the SAT IO Context
663 * \return If command is started successfully
664 * - \e tiSuccess: I/O request successfully initiated.
665 * - \e tiBusy: No resources available, try again later.
666 * - \e tiIONoDevice: Invalid device handle.
667 * - \e tiError: Other errors.
669 /*****************************************************************************/
670 GLOBAL bit32 satRequestSense_1(
672 tiIORequest_t *tiIORequest,
673 tiDeviceHandle_t *tiDeviceHandle,
674 tiScsiInitiatorRequest_t *tiScsiRequest,
675 satIOContext_t *satIOContext);
677 /*****************************************************************************/
678 /*! \brief SAT implementation for SCSI satFormatUnit.
680 * SAT implementation for SCSI satFormatUnit.
682 * \param tiRoot: Pointer to TISA initiator driver/port instance.
683 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
684 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
685 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
686 * \param satIOContext_t: Pointer to the SAT IO Context
688 * \return If command is started successfully
689 * - \e tiSuccess: I/O request successfully initiated.
690 * - \e tiBusy: No resources available, try again later.
691 * - \e tiIONoDevice: Invalid device handle.
692 * - \e tiError: Other errors.
694 /*****************************************************************************/
695 GLOBAL bit32 satFormatUnit(
697 tiIORequest_t *tiIORequest,
698 tiDeviceHandle_t *tiDeviceHandle,
699 tiScsiInitiatorRequest_t *tiScsiRequest,
700 satIOContext_t *satIOContext);
702 /*****************************************************************************/
703 /*! \brief SAT implementation for SCSI satSendDiagnostic.
705 * SAT implementation for SCSI satSendDiagnostic.
707 * \param tiRoot: Pointer to TISA initiator driver/port instance.
708 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
709 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
710 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
711 * \param satIOContext_t: Pointer to the SAT IO Context
713 * \return If command is started successfully
714 * - \e tiSuccess: I/O request successfully initiated.
715 * - \e tiBusy: No resources available, try again later.
716 * - \e tiIONoDevice: Invalid device handle.
717 * - \e tiError: Other errors.
719 /*****************************************************************************/
720 GLOBAL bit32 satSendDiagnostic(
722 tiIORequest_t *tiIORequest,
723 tiDeviceHandle_t *tiDeviceHandle,
724 tiScsiInitiatorRequest_t *tiScsiRequest,
725 satIOContext_t *satIOContext);
727 /*****************************************************************************/
728 /*! \brief SAT implementation for SCSI satSendDiagnostic_1.
730 * SAT implementation for SCSI satSendDiagnostic_1.
731 * Sub function of satSendDiagnostic.
733 * \param tiRoot: Pointer to TISA initiator driver/port instance.
734 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
735 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
736 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
737 * \param satIOContext_t: Pointer to the SAT IO Context
739 * \return If command is started successfully
740 * - \e tiSuccess: I/O request successfully initiated.
741 * - \e tiBusy: No resources available, try again later.
742 * - \e tiIONoDevice: Invalid device handle.
743 * - \e tiError: Other errors.
745 /*****************************************************************************/
746 GLOBAL bit32 satSendDiagnostic_1(
748 tiIORequest_t *tiIORequest,
749 tiDeviceHandle_t *tiDeviceHandle,
750 tiScsiInitiatorRequest_t *tiScsiRequest,
751 satIOContext_t *satIOContext);
752 /*****************************************************************************/
753 /*! \brief SAT implementation for SCSI satSendDiagnostic_2.
755 * SAT implementation for SCSI satSendDiagnostic_2.
756 * Sub function of satSendDiagnostic.
758 * \param tiRoot: Pointer to TISA initiator driver/port instance.
759 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
760 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
761 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
762 * \param satIOContext_t: Pointer to the SAT IO Context
764 * \return If command is started successfully
765 * - \e tiSuccess: I/O request successfully initiated.
766 * - \e tiBusy: No resources available, try again later.
767 * - \e tiIONoDevice: Invalid device handle.
768 * - \e tiError: Other errors.
770 /*****************************************************************************/
771 GLOBAL bit32 satSendDiagnostic_2(
773 tiIORequest_t *tiIORequest,
774 tiDeviceHandle_t *tiDeviceHandle,
775 tiScsiInitiatorRequest_t *tiScsiRequest,
776 satIOContext_t *satIOContext);
778 /*****************************************************************************/
779 /*! \brief SAT implementation for SCSI satStartStopUnit.
781 * SAT implementation for SCSI satStartStopUnit.
783 * \param tiRoot: Pointer to TISA initiator driver/port instance.
784 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
785 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
786 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
787 * \param satIOContext_t: Pointer to the SAT IO Context
789 * \return If command is started successfully
790 * - \e tiSuccess: I/O request successfully initiated.
791 * - \e tiBusy: No resources available, try again later.
792 * - \e tiIONoDevice: Invalid device handle.
793 * - \e tiError: Other errors.
795 /*****************************************************************************/
796 GLOBAL bit32 satStartStopUnit(
798 tiIORequest_t *tiIORequest,
799 tiDeviceHandle_t *tiDeviceHandle,
800 tiScsiInitiatorRequest_t *tiScsiRequest,
801 satIOContext_t *satIOContext);
802 /*****************************************************************************/
803 /*! \brief SAT implementation for SCSI satStartStopUnit_1.
805 * SAT implementation for SCSI satStartStopUnit_1.
806 * Sub function of satStartStopUnit
808 * \param tiRoot: Pointer to TISA initiator driver/port instance.
809 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
810 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
811 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
812 * \param satIOContext_t: Pointer to the SAT IO Context
814 * \return If command is started successfully
815 * - \e tiSuccess: I/O request successfully initiated.
816 * - \e tiBusy: No resources available, try again later.
817 * - \e tiIONoDevice: Invalid device handle.
818 * - \e tiError: Other errors.
820 /*****************************************************************************/
821 GLOBAL bit32 satStartStopUnit_1(
823 tiIORequest_t *tiIORequest,
824 tiDeviceHandle_t *tiDeviceHandle,
825 tiScsiInitiatorRequest_t *tiScsiRequest,
826 satIOContext_t *satIOContext);
828 /*****************************************************************************/
829 /*! \brief SAT implementation for SCSI satRead10_1.
831 * SAT implementation for SCSI satRead10_1
832 * Sub function of satRead10
834 * \param tiRoot: Pointer to TISA initiator driver/port instance.
835 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
836 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
837 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
838 * \param satIOContext_t: Pointer to the SAT IO Context
840 * \return If command is started successfully
841 * - \e tiSuccess: I/O request successfully initiated.
842 * - \e tiBusy: No resources available, try again later.
843 * - \e tiIONoDevice: Invalid device handle.
844 * - \e tiError: Other errors.
846 /*****************************************************************************/
847 GLOBAL bit32 satRead_1(
849 tiIORequest_t *tiIORequest,
850 tiDeviceHandle_t *tiDeviceHandle,
851 tiScsiInitiatorRequest_t *tiScsiRequest,
852 satIOContext_t *satIOContext);
853 GLOBAL bit32 satRead10_2(
855 tiIORequest_t *tiIORequest,
856 tiDeviceHandle_t *tiDeviceHandle,
857 tiScsiInitiatorRequest_t *tiScsiRequest,
858 satIOContext_t *satIOContext);
860 /*****************************************************************************/
861 /*! \brief SAT implementation for SCSI satWriteSame10.
863 * SAT implementation for SCSI satWriteSame10.
865 * \param tiRoot: Pointer to TISA initiator driver/port instance.
866 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
867 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
868 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
869 * \param satIOContext_t: Pointer to the SAT IO Context
871 * \return If command is started successfully
872 * - \e tiSuccess: I/O request successfully initiated.
873 * - \e tiBusy: No resources available, try again later.
874 * - \e tiIONoDevice: Invalid device handle.
875 * - \e tiError: Other errors.
877 /*****************************************************************************/
878 GLOBAL bit32 satWriteSame10(
880 tiIORequest_t *tiIORequest,
881 tiDeviceHandle_t *tiDeviceHandle,
882 tiScsiInitiatorRequest_t *tiScsiRequest,
883 satIOContext_t *satIOContext);
885 GLOBAL bit32 satWriteSame10_1(
887 tiIORequest_t *tiIORequest,
888 tiDeviceHandle_t *tiDeviceHandle,
889 tiScsiInitiatorRequest_t *tiScsiRequest,
890 satIOContext_t *satIOContext,
893 GLOBAL bit32 satWriteSame10_2(
895 tiIORequest_t *tiIORequest,
896 tiDeviceHandle_t *tiDeviceHandle,
897 tiScsiInitiatorRequest_t *tiScsiRequest,
898 satIOContext_t *satIOContext,
901 GLOBAL bit32 satWriteSame10_3(
903 tiIORequest_t *tiIORequest,
904 tiDeviceHandle_t *tiDeviceHandle,
905 tiScsiInitiatorRequest_t *tiScsiRequest,
906 satIOContext_t *satIOContext,
909 /*****************************************************************************/
910 /*! \brief SAT implementation for SCSI satWriteSame16.
912 * SAT implementation for SCSI satWriteSame16.
914 * \param tiRoot: Pointer to TISA initiator driver/port instance.
915 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
916 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
917 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
918 * \param satIOContext_t: Pointer to the SAT IO Context
920 * \return If command is started successfully
921 * - \e tiSuccess: I/O request successfully initiated.
922 * - \e tiBusy: No resources available, try again later.
923 * - \e tiIONoDevice: Invalid device handle.
924 * - \e tiError: Other errors.
926 /*****************************************************************************/
927 GLOBAL bit32 satWriteSame16(
929 tiIORequest_t *tiIORequest,
930 tiDeviceHandle_t *tiDeviceHandle,
931 tiScsiInitiatorRequest_t *tiScsiRequest,
932 satIOContext_t *satIOContext);
934 /*****************************************************************************/
935 /*! \brief SAT implementation for SCSI satLogSenseAllocate.
937 * Part of SAT implementation for SCSI satLogSense.
939 * \param tiRoot: Pointer to TISA initiator driver/port instance.
940 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
941 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
942 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
943 * \param satIOContext_t: Pointer to the SAT IO Context
944 * \param payloadSize: size of payload to be allocated.
945 * \param flag: flag value
947 * \return If command is started successfully
948 * - \e tiSuccess: I/O request successfully initiated.
949 * - \e tiBusy: No resources available, try again later.
950 * - \e tiIONoDevice: Invalid device handle.
951 * - \e tiError: Other errors.
953 * - flag values: LOG_SENSE_0, LOG_SENSE_1, LOG_SENSE_2
955 /*****************************************************************************/
956 GLOBAL bit32 satLogSenseAllocate(
958 tiIORequest_t *tiIORequest,
959 tiDeviceHandle_t *tiDeviceHandle,
960 tiScsiInitiatorRequest_t *tiScsiRequest,
961 satIOContext_t *satIOContext,
966 /*****************************************************************************/
967 /*! \brief SAT implementation for SCSI satSMARTEnable.
969 * Part of SAT implementation for SCSI satLogSense.
971 * \param tiRoot: Pointer to TISA initiator driver/port instance.
972 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
973 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
974 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
975 * \param satIOContext_t: Pointer to the SAT IO Context
977 * \return If command is started successfully
978 * - \e tiSuccess: I/O request successfully initiated.
979 * - \e tiBusy: No resources available, try again later.
980 * - \e tiIONoDevice: Invalid device handle.
981 * - \e tiError: Other errors.
983 /*****************************************************************************/
984 GLOBAL bit32 satSMARTEnable(
986 tiIORequest_t *tiIORequest,
987 tiDeviceHandle_t *tiDeviceHandle,
988 tiScsiInitiatorRequest_t *tiScsiRequest,
989 satIOContext_t *satIOContext);
991 /*****************************************************************************/
992 /*! \brief SAT implementation for SCSI satLogSense_1.
994 * Part of SAT implementation for SCSI satLogSense.
996 * \param tiRoot: Pointer to TISA initiator driver/port instance.
997 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
998 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
999 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1000 * \param satIOContext_t: Pointer to the SAT IO Context
1002 * \return If command is started successfully
1003 * - \e tiSuccess: I/O request successfully initiated.
1004 * - \e tiBusy: No resources available, try again later.
1005 * - \e tiIONoDevice: Invalid device handle.
1006 * - \e tiError: Other errors.
1008 /*****************************************************************************/
1009 GLOBAL bit32 satLogSense_1(
1011 tiIORequest_t *tiIORequest,
1012 tiDeviceHandle_t *tiDeviceHandle,
1013 tiScsiInitiatorRequest_t *tiScsiRequest,
1014 satIOContext_t *satIOContext);
1016 /*****************************************************************************/
1017 /*! \brief SAT implementation for SCSI satLogSense_2.
1019 * Part of SAT implementation for SCSI satLogSense.
1021 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1022 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1023 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1024 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1025 * \param satIOContext_t: Pointer to the SAT IO Context
1027 * \return If command is started successfully
1028 * - \e tiSuccess: I/O request successfully initiated.
1029 * - \e tiBusy: No resources available, try again later.
1030 * - \e tiIONoDevice: Invalid device handle.
1031 * - \e tiError: Other errors.
1033 /*****************************************************************************/
1034 GLOBAL bit32 satLogSense_2(
1036 tiIORequest_t *tiIORequest,
1037 tiDeviceHandle_t *tiDeviceHandle,
1038 tiScsiInitiatorRequest_t *tiScsiRequest,
1039 satIOContext_t *satIOContext);
1041 /*****************************************************************************/
1042 /*! \brief SAT implementation for SCSI satLogSense_3.
1044 * Part of SAT implementation for SCSI satLogSense.
1046 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1047 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1048 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1049 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1050 * \param satIOContext_t: Pointer to the SAT IO Context
1052 * \return If command is started successfully
1053 * - \e tiSuccess: I/O request successfully initiated.
1054 * - \e tiBusy: No resources available, try again later.
1055 * - \e tiIONoDevice: Invalid device handle.
1056 * - \e tiError: Other errors.
1058 /*****************************************************************************/
1059 GLOBAL bit32 satLogSense_3(
1061 tiIORequest_t *tiIORequest,
1062 tiDeviceHandle_t *tiDeviceHandle,
1063 tiScsiInitiatorRequest_t *tiScsiRequest,
1064 satIOContext_t *satIOContext);
1067 /*****************************************************************************/
1068 /*! \brief SAT implementation for SCSI satLogSense.
1070 * SAT implementation for SCSI satLogSense.
1072 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1073 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1074 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1075 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1076 * \param satIOContext_t: Pointer to the SAT IO Context
1078 * \return If command is started successfully
1079 * - \e tiSuccess: I/O request successfully initiated.
1080 * - \e tiBusy: No resources available, try again later.
1081 * - \e tiIONoDevice: Invalid device handle.
1082 * - \e tiError: Other errors.
1084 /*****************************************************************************/
1085 GLOBAL bit32 satLogSense(
1087 tiIORequest_t *tiIORequest,
1088 tiDeviceHandle_t *tiDeviceHandle,
1089 tiScsiInitiatorRequest_t *tiScsiRequest,
1090 satIOContext_t *satIOContext);
1092 /*****************************************************************************/
1093 /*! \brief SAT implementation for SCSI satModeSelect6.
1095 * SAT implementation for SCSI satModeSelect6.
1097 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1098 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1099 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1100 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1101 * \param satIOContext_t: Pointer to the SAT IO Context
1103 * \return If command is started successfully
1104 * - \e tiSuccess: I/O request successfully initiated.
1105 * - \e tiBusy: No resources available, try again later.
1106 * - \e tiIONoDevice: Invalid device handle.
1107 * - \e tiError: Other errors.
1109 /*****************************************************************************/
1110 GLOBAL bit32 satModeSelect6(
1112 tiIORequest_t *tiIORequest,
1113 tiDeviceHandle_t *tiDeviceHandle,
1114 tiScsiInitiatorRequest_t *tiScsiRequest,
1115 satIOContext_t *satIOContext);
1116 GLOBAL bit32 satModeSelect6n10_1(
1118 tiIORequest_t *tiIORequest,
1119 tiDeviceHandle_t *tiDeviceHandle,
1120 tiScsiInitiatorRequest_t *tiScsiRequest,
1121 satIOContext_t *satIOContext);
1123 /*****************************************************************************/
1124 /*! \brief SAT implementation for SCSI satModeSelect10.
1126 * SAT implementation for SCSI satModeSelect10.
1128 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1129 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1130 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1131 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1132 * \param satIOContext_t: Pointer to the SAT IO Context
1134 * \return If command is started successfully
1135 * - \e tiSuccess: I/O request successfully initiated.
1136 * - \e tiBusy: No resources available, try again later.
1137 * - \e tiIONoDevice: Invalid device handle.
1138 * - \e tiError: Other errors.
1140 /*****************************************************************************/
1141 GLOBAL bit32 satModeSelect10(
1143 tiIORequest_t *tiIORequest,
1144 tiDeviceHandle_t *tiDeviceHandle,
1145 tiScsiInitiatorRequest_t *tiScsiRequest,
1146 satIOContext_t *satIOContext);
1148 /*****************************************************************************/
1149 /*! \brief SAT implementation for SCSI satSynchronizeCache10.
1151 * SAT implementation for SCSI satSynchronizeCache10.
1153 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1154 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1155 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1156 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1157 * \param satIOContext_t: Pointer to the SAT IO Context
1159 * \return If command is started successfully
1160 * - \e tiSuccess: I/O request successfully initiated.
1161 * - \e tiBusy: No resources available, try again later.
1162 * - \e tiIONoDevice: Invalid device handle.
1163 * - \e tiError: Other errors.
1165 /*****************************************************************************/
1166 GLOBAL bit32 satSynchronizeCache10(
1168 tiIORequest_t *tiIORequest,
1169 tiDeviceHandle_t *tiDeviceHandle,
1170 tiScsiInitiatorRequest_t *tiScsiRequest,
1171 satIOContext_t *satIOContext);
1173 /*****************************************************************************/
1174 /*! \brief SAT implementation for SCSI satSynchronizeCache16.
1176 * SAT implementation for SCSI satSynchronizeCache16.
1178 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1179 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1180 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1181 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1182 * \param satIOContext_t: Pointer to the SAT IO Context
1184 * \return If command is started successfully
1185 * - \e tiSuccess: I/O request successfully initiated.
1186 * - \e tiBusy: No resources available, try again later.
1187 * - \e tiIONoDevice: Invalid device handle.
1188 * - \e tiError: Other errors.
1190 /*****************************************************************************/
1191 GLOBAL bit32 satSynchronizeCache16(
1193 tiIORequest_t *tiIORequest,
1194 tiDeviceHandle_t *tiDeviceHandle,
1195 tiScsiInitiatorRequest_t *tiScsiRequest,
1196 satIOContext_t *satIOContext);
1198 /*****************************************************************************/
1199 /*! \brief SAT implementation for SCSI satWriteAndVerify10.
1201 * SAT implementation for SCSI satWriteAndVerify10.
1203 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1204 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1205 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1206 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1207 * \param satIOContext_t: Pointer to the SAT IO Context
1209 * \return If command is started successfully
1210 * - \e tiSuccess: I/O request successfully initiated.
1211 * - \e tiBusy: No resources available, try again later.
1212 * - \e tiIONoDevice: Invalid device handle.
1213 * - \e tiError: Other errors.
1215 /*****************************************************************************/
1216 GLOBAL bit32 satWriteAndVerify10(
1218 tiIORequest_t *tiIORequest,
1219 tiDeviceHandle_t *tiDeviceHandle,
1220 tiScsiInitiatorRequest_t *tiScsiRequest,
1221 satIOContext_t *satIOContext);
1224 /*****************************************************************************/
1225 /*! \brief SAT implementation for SCSI satWriteAndVerify10_1.
1227 * SAT implementation for SCSI satWriteAndVerify10_1.
1228 * Sub function of satWriteAndVerify10
1230 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1231 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1232 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1233 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1234 * \param satIOContext_t: Pointer to the SAT IO Context
1236 * \return If command is started successfully
1237 * - \e tiSuccess: I/O request successfully initiated.
1238 * - \e tiBusy: No resources available, try again later.
1239 * - \e tiIONoDevice: Invalid device handle.
1240 * - \e tiError: Other errors.
1242 /*****************************************************************************/
1243 GLOBAL bit32 satWriteAndVerify10_1(
1245 tiIORequest_t *tiIORequest,
1246 tiDeviceHandle_t *tiDeviceHandle,
1247 tiScsiInitiatorRequest_t *tiScsiRequest,
1248 satIOContext_t *satIOContext);
1251 /*****************************************************************************/
1252 /*! \brief SAT implementation for SCSI satWriteAndVerify12.
1254 * SAT implementation for SCSI satWriteAndVerify12.
1256 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1257 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1258 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1259 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1260 * \param satIOContext_t: Pointer to the SAT IO Context
1262 * \return If command is started successfully
1263 * - \e tiSuccess: I/O request successfully initiated.
1264 * - \e tiBusy: No resources available, try again later.
1265 * - \e tiIONoDevice: Invalid device handle.
1266 * - \e tiError: Other errors.
1268 /*****************************************************************************/
1269 GLOBAL bit32 satWriteAndVerify12(
1271 tiIORequest_t *tiIORequest,
1272 tiDeviceHandle_t *tiDeviceHandle,
1273 tiScsiInitiatorRequest_t *tiScsiRequest,
1274 satIOContext_t *satIOContext);
1276 GLOBAL bit32 satNonChainedWriteNVerify_Verify(
1278 tiIORequest_t *tiIORequest,
1279 tiDeviceHandle_t *tiDeviceHandle,
1280 tiScsiInitiatorRequest_t *tiScsiRequest,
1281 satIOContext_t *satIOContext);
1283 GLOBAL bit32 satChainedWriteNVerify_Write(
1285 tiIORequest_t *tiIORequest,
1286 tiDeviceHandle_t *tiDeviceHandle,
1287 tiScsiInitiatorRequest_t *tiScsiRequest,
1288 satIOContext_t *satIOContext);
1290 GLOBAL bit32 satChainedWriteNVerify_Verify(
1292 tiIORequest_t *tiIORequest,
1293 tiDeviceHandle_t *tiDeviceHandle,
1294 tiScsiInitiatorRequest_t *tiScsiRequest,
1295 satIOContext_t *satIOContext);
1297 GLOBAL bit32 satChainedWriteNVerify_Start_Verify(
1299 tiIORequest_t *tiIORequest,
1300 tiDeviceHandle_t *tiDeviceHandle,
1301 tiScsiInitiatorRequest_t *tiScsiRequest,
1302 satIOContext_t *satIOContext);
1305 /*****************************************************************************/
1306 /*! \brief SAT implementation for SCSI satWriteAndVerify16.
1308 * SAT implementation for SCSI satWriteAndVerify16.
1310 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1311 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1312 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1313 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1314 * \param satIOContext_t: Pointer to the SAT IO Context
1316 * \return If command is started successfully
1317 * - \e tiSuccess: I/O request successfully initiated.
1318 * - \e tiBusy: No resources available, try again later.
1319 * - \e tiIONoDevice: Invalid device handle.
1320 * - \e tiError: Other errors.
1322 /*****************************************************************************/
1323 GLOBAL bit32 satWriteAndVerify16(
1325 tiIORequest_t *tiIORequest,
1326 tiDeviceHandle_t *tiDeviceHandle,
1327 tiScsiInitiatorRequest_t *tiScsiRequest,
1328 satIOContext_t *satIOContext);
1330 GLOBAL bit32 satChainedVerify16(
1332 tiIORequest_t *tiIORequest,
1333 tiDeviceHandle_t *tiDeviceHandle,
1334 tiScsiInitiatorRequest_t *tiScsiRequest,
1335 satIOContext_t *satIOContext);
1337 /*****************************************************************************/
1338 /*! \brief SAT implementation for SCSI TEST UNIT READY.
1340 * SAT implementation for SCSI TUR and send FIS request to LL layer.
1342 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1343 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1344 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1345 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1346 * \param satIOContext_t: Pointer to the SAT IO Context
1348 * \return If command is started successfully
1349 * - \e tiSuccess: I/O request successfully initiated.
1350 * - \e tiBusy: No resources available, try again later.
1351 * - \e tiIONoDevice: Invalid device handle.
1352 * - \e tiError: Other errors.
1354 /*****************************************************************************/
1355 GLOBAL bit32 satTestUnitReady(
1357 tiIORequest_t *tiIORequest,
1358 tiDeviceHandle_t *tiDeviceHandle,
1359 tiScsiInitiatorRequest_t *tiScsiRequest,
1360 satIOContext_t *satIOContext);
1362 /*****************************************************************************/
1363 /*! \brief SAT implementation for SCSI MODE SENSE (6).
1365 * SAT implementation for SCSI MODE SENSE (6).
1367 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1368 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1369 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1370 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1371 * \param satIOContext_t: Pointer to the SAT IO Context
1373 * \return If command is started successfully
1374 * - \e tiSuccess: I/O request successfully initiated.
1375 * - \e tiBusy: No resources available, try again later.
1376 * - \e tiIONoDevice: Invalid device handle.
1377 * - \e tiError: Other errors.
1379 /*****************************************************************************/
1380 GLOBAL bit32 satModeSense6(
1382 tiIORequest_t *tiIORequest,
1383 tiDeviceHandle_t *tiDeviceHandle,
1384 tiScsiInitiatorRequest_t *tiScsiRequest,
1385 satIOContext_t *satIOContext);
1388 /*****************************************************************************/
1389 /*! \brief SAT implementation for SCSI MODE SENSE (10).
1391 * SAT implementation for SCSI MODE SENSE (10).
1393 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1394 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1395 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1396 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1397 * \param satIOContext_t: Pointer to the SAT IO Context
1399 * \return If command is started successfully
1400 * - \e tiSuccess: I/O request successfully initiated.
1401 * - \e tiBusy: No resources available, try again later.
1402 * - \e tiIONoDevice: Invalid device handle.
1403 * - \e tiError: Other errors.
1405 /*****************************************************************************/
1406 GLOBAL bit32 satModeSense10(
1408 tiIORequest_t *tiIORequest,
1409 tiDeviceHandle_t *tiDeviceHandle,
1410 tiScsiInitiatorRequest_t *tiScsiRequest,
1411 satIOContext_t *satIOContext);
1414 /*****************************************************************************/
1415 /*! \brief SAT implementation for SCSI VERIFY (10).
1417 * SAT implementation for SCSI VERIFY (10).
1419 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1420 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1421 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1422 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1423 * \param satIOContext_t: Pointer to the SAT IO Context
1425 * \return If command is started successfully
1426 * - \e tiSuccess: I/O request successfully initiated.
1427 * - \e tiBusy: No resources available, try again later.
1428 * - \e tiIONoDevice: Invalid device handle.
1429 * - \e tiError: Other errors.
1431 /*****************************************************************************/
1432 GLOBAL bit32 satVerify10(
1434 tiIORequest_t *tiIORequest,
1435 tiDeviceHandle_t *tiDeviceHandle,
1436 tiScsiInitiatorRequest_t *tiScsiRequest,
1437 satIOContext_t *satIOContext);
1439 GLOBAL bit32 satChainedVerify(
1441 tiIORequest_t *tiIORequest,
1442 tiDeviceHandle_t *tiDeviceHandle,
1443 tiScsiInitiatorRequest_t *tiScsiRequest,
1444 satIOContext_t *satIOContext);
1446 /*****************************************************************************/
1447 /*! \brief SAT implementation for SCSI VERIFY (12).
1449 * SAT implementation for SCSI VERIFY (12).
1451 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1452 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1453 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1454 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1455 * \param satIOContext_t: Pointer to the SAT IO Context
1457 * \return If command is started successfully
1458 * - \e tiSuccess: I/O request successfully initiated.
1459 * - \e tiBusy: No resources available, try again later.
1460 * - \e tiIONoDevice: Invalid device handle.
1461 * - \e tiError: Other errors.
1463 /*****************************************************************************/
1464 GLOBAL bit32 satVerify12(
1466 tiIORequest_t *tiIORequest,
1467 tiDeviceHandle_t *tiDeviceHandle,
1468 tiScsiInitiatorRequest_t *tiScsiRequest,
1469 satIOContext_t *satIOContext);
1470 /*****************************************************************************/
1471 /*! \brief SAT implementation for SCSI VERIFY (16).
1473 * SAT implementation for SCSI VERIFY (16).
1475 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1476 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1477 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1478 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1479 * \param satIOContext_t: Pointer to the SAT IO Context
1481 * \return If command is started successfully
1482 * - \e tiSuccess: I/O request successfully initiated.
1483 * - \e tiBusy: No resources available, try again later.
1484 * - \e tiIONoDevice: Invalid device handle.
1485 * - \e tiError: Other errors.
1487 /*****************************************************************************/
1488 GLOBAL bit32 satVerify16(
1490 tiIORequest_t *tiIORequest,
1491 tiDeviceHandle_t *tiDeviceHandle,
1492 tiScsiInitiatorRequest_t *tiScsiRequest,
1493 satIOContext_t *satIOContext);
1494 /*****************************************************************************/
1495 /*! \brief SAT implementation for SCSI satTestUnitReady_1.
1497 * SAT implementation for SCSI satTestUnitReady_1
1498 * Sub function of satTestUnitReady
1500 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1501 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1502 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1503 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1504 * \param satIOContext_t: Pointer to the SAT IO Context
1506 * \return If command is started successfully
1507 * - \e tiSuccess: I/O request successfully initiated.
1508 * - \e tiBusy: No resources available, try again later.
1509 * - \e tiIONoDevice: Invalid device handle.
1510 * - \e tiError: Other errors.
1512 /*****************************************************************************/
1513 GLOBAL bit32 satTestUnitReady_1(
1515 tiIORequest_t *tiIORequest,
1516 tiDeviceHandle_t *tiDeviceHandle,
1517 tiScsiInitiatorRequest_t *tiScsiRequest,
1518 satIOContext_t *satIOContext);
1520 /*****************************************************************************/
1521 /*! \brief SAT implementation for SCSI STANDARD INQUIRY.
1523 * SAT implementation for SCSI STANDARD INQUIRY.
1525 * \param pInquiry: Pointer to Inquiry Data buffer.
1526 * \param pSATAIdData: Pointer to ATA IDENTIFY DEVICE data.
1530 /*****************************************************************************/
1531 GLOBAL void satInquiryStandard(
1533 agsaSATAIdentifyData_t *pSATAIdData,
1534 tiIniScsiCmnd_t *scsiCmnd
1538 /*****************************************************************************/
1539 /*! \brief SAT implementation for SCSI INQUIRY page 0.
1541 * SAT implementation for SCSI INQUIRY page 0.
1543 * \param pInquiry: Pointer to Inquiry Data buffer.
1544 * \param pSATAIdData: Pointer to ATA IDENTIFY DEVICE data.
1548 /*****************************************************************************/
1549 GLOBAL void satInquiryPage0(
1551 agsaSATAIdentifyData_t *pSATAIdData);
1554 /*****************************************************************************/
1555 /*! \brief SAT implementation for SCSI INQUIRY page 83.
1557 * SAT implementation for SCSI INQUIRY page 83.
1559 * \param pInquiry: Pointer to Inquiry Data buffer.
1560 * \param pSATAIdData: Pointer to ATA IDENTIFY DEVICE data.
1561 * \param pSatDevData Pointer to internal device data structure
1565 /*****************************************************************************/
1566 GLOBAL void satInquiryPage83(
1568 agsaSATAIdentifyData_t *pSATAIdData,
1569 satDeviceData_t *pSatDevData);
1571 /*****************************************************************************/
1572 /*! \brief SAT implementation for SCSI INQUIRY page 89.
1574 * SAT implementation for SCSI INQUIRY page 89.
1576 * \param pInquiry: Pointer to Inquiry Data buffer.
1577 * \param pSATAIdData: Pointer to ATA IDENTIFY DEVICE data.
1578 * \param pSatDevData Pointer to internal device data structure
1582 /*****************************************************************************/
1583 GLOBAL void satInquiryPage89(
1585 agsaSATAIdentifyData_t *pSATAIdData,
1586 satDeviceData_t *pSatDevData);
1588 /*****************************************************************************/
1589 /*! \brief SAT implementation for SCSI INQUIRY page 80.
1591 * SAT implementation for SCSI INQUIRY page 80.
1593 * \param pInquiry: Pointer to Inquiry Data buffer.
1594 * \param pSATAIdData: Pointer to ATA IDENTIFY DEVICE data.
1598 /*****************************************************************************/
1599 GLOBAL void satInquiryPage80(
1601 agsaSATAIdentifyData_t *pSATAIdData);
1604 /*****************************************************************************
1605 *! \brief sataLLIOStart
1607 * This routine is called to initiate a new SATA request to LL layer.
1608 * This function implements/encapsulates HW and LL API dependency.
1610 * \param tiRoot: Pointer to TISA initiator driver/port instance.
1611 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
1612 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
1613 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
1614 * \param satIOContext_t: Pointer to the SAT IO Context
1618 * tiSuccess: I/O request successfully initiated.
1619 * tiBusy: No resources available, try again later.
1620 * tiIONoDevice: Invalid device handle.
1621 * tiError: Other errors that prevent the I/O request to be started.
1624 *****************************************************************************/
1626 GLOBAL bit32 sataLLIOStart (
1628 tiIORequest_t *tiIORequest,
1629 tiDeviceHandle_t *tiDeviceHandle,
1630 tiScsiInitiatorRequest_t *tiScsiRequest,
1631 satIOContext_t *satIOContext
1634 /*****************************************************************************
1635 *! \brief itdsataIOPrepareSGL
1637 * This function is called to prepare and translate the TISA SGL information
1638 * to the SAS/SATA LL layer specific SGL.
1640 * \param tiRoot: Pointer to initiator driver/port instance.
1641 * \param IORequestBody: TD layer request body for the I/O.
1642 * \param tiSgl1: First TISA SGL info.
1643 * \param sglVirtualAddr: The virtual address of the first element in
1644 * tiSgl1 when tiSgl1 is used with the type tiSglList.
1648 * tiSuccess: SGL initialized successfully.
1649 * tiError: Failed to initialize SGL.
1652 *****************************************************************************/
1653 osGLOBAL bit32 itdsataIOPrepareSGL(
1655 tdIORequestBody_t *tdIORequestBody,
1657 void *sglVirtualAddr
1660 /*****************************************************************************
1661 *! \brief satNonChainedDataIOCB
1663 * This routine is a callback function called from ossaSATACompleted().
1664 * This CB routine deals with normal non-chained data I/O SATA request.
1666 * \param agRoot: Handles for this instance of SAS/SATA hardware
1667 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
1668 * \param agIOStatus: Status of completed I/O.
1669 * \param agSATAParm1: Additional info based on status.
1670 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
1672 * \param ioContext: Pointer to satIOContext_t.
1676 *****************************************************************************/
1678 void satNonChainedDataIOCB(
1680 agsaIORequest_t *agIORequest,
1682 agsaFisHeader_t *agFirstDword,
1684 agsaFrameHandle_t agFrameHandle,
1687 void satChainedDataIOCB(
1689 agsaIORequest_t *agIORequest,
1691 agsaFisHeader_t *agFirstDword,
1693 agsaFrameHandle_t agFrameHandle,
1697 void satNonChainedWriteNVerifyCB(
1699 agsaIORequest_t *agIORequest,
1701 agsaFisHeader_t *agFirstDword,
1703 agsaFrameHandle_t agFrameHandle,
1707 void satChainedWriteNVerifyCB(
1709 agsaIORequest_t *agIORequest,
1711 agsaFisHeader_t *agFirstDword,
1713 agsaFrameHandle_t agFrameHandle,
1717 /*****************************************************************************
1718 *! \brief satNonDataIOCB
1720 * This routine is a callback function called from ossaSATACompleted().
1721 * This CB routine deals with non-data I/O SATA request.
1723 * \param agRoot: Handles for this instance of SAS/SATA hardware
1724 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
1725 * \param agIOStatus: Status of completed I/O.
1726 * \param agSATAParm1: Additional info based on status.
1727 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
1729 * \param ioContext: Pointer to satIOContext_t.
1733 *****************************************************************************/
1734 void satNonDataIOCB(
1736 agsaIORequest_t *agIORequest,
1738 agsaFisHeader_t *agFirstDword,
1740 agsaFrameHandle_t agFrameHandle,
1744 /*****************************************************************************
1745 *! \brief satSMARTEnableCB
1747 * This routine is a callback function for satSMARTEnable()
1749 * \param agRoot: Handles for this instance of SAS/SATA hardware
1750 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
1751 * \param agIOStatus: Status of completed I/O.
1752 * \param agSATAParm1: Additional info based on status.
1753 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
1755 * \param ioContext: Pointer to satIOContext_t.
1759 *****************************************************************************/
1760 void satSMARTEnableCB(
1762 agsaIORequest_t *agIORequest,
1764 agsaFisHeader_t *agFirstDword,
1766 agsaFrameHandle_t agFrameHandle,
1770 /*****************************************************************************
1771 *! \brief satLogSenseCB
1773 * This routine is a callback function for satLogSense()
1775 * \param agRoot: Handles for this instance of SAS/SATA hardware
1776 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
1777 * \param agIOStatus: Status of completed I/O.
1778 * \param agSATAParm1: Additional info based on status.
1779 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
1781 * \param ioContext: Pointer to satIOContext_t.
1785 *****************************************************************************/
1788 agsaIORequest_t *agIORequest,
1790 agsaFisHeader_t *agFirstDword,
1792 agsaFrameHandle_t agFrameHandle,
1795 void satModeSelect6n10CB(
1797 agsaIORequest_t *agIORequest,
1799 agsaFisHeader_t *agFirstDword,
1801 agsaFrameHandle_t agFrameHandle,
1804 void satSynchronizeCache10n16CB(
1806 agsaIORequest_t *agIORequest,
1808 agsaFisHeader_t *agFirstDword,
1810 agsaFrameHandle_t agFrameHandle,
1814 void satWriteAndVerify10CB(
1816 agsaIORequest_t *agIORequest,
1818 agsaFisHeader_t *agFirstDword,
1820 agsaFrameHandle_t agFrameHandle,
1825 /*****************************************************************************
1826 *! \brief satReadLogExtCB
1828 * This routine is a callback function called from ossaSATACompleted().
1829 * This CB routine deals READ LOG EXT completion.
1831 * \param agRoot: Handles for this instance of SAS/SATA hardware
1832 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
1833 * \param agIOStatus: Status of completed I/O.
1834 * \param agSATAParm1: Additional info based on status.
1835 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
1837 * \param ioContext: Pointer to satIOContext_t.
1841 *****************************************************************************/
1842 void satReadLogExtCB(
1844 agsaIORequest_t *agIORequest,
1846 agsaFisHeader_t *agFirstDword,
1848 agsaFrameHandle_t agFrameHandle,
1851 void satTestUnitReadyCB(
1853 agsaIORequest_t *agIORequest,
1855 agsaFisHeader_t *agFirstDword,
1857 agsaFrameHandle_t agFrameHandle,
1860 void satWriteSame10CB(
1862 agsaIORequest_t *agIORequest,
1864 agsaFisHeader_t *agFirstDword,
1866 agsaFrameHandle_t agFrameHandle,
1869 /*****************************************************************************
1870 *! \brief satSendDiagnosticCB
1872 * This routine is a callback function called from ossaSATACompleted().
1873 * This CB routine deals with Send Diagnostic completion.
1875 * \param agRoot: Handles for this instance of SAS/SATA hardware
1876 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
1877 * \param agIOStatus: Status of completed I/O.
1878 * \param agSATAParm1: Additional info based on status.
1879 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
1881 * \param ioContext: Pointer to satIOContext_t.
1885 *****************************************************************************/
1886 void satSendDiagnosticCB(
1888 agsaIORequest_t *agIORequest,
1890 agsaFisHeader_t *agFirstDword,
1892 agsaFrameHandle_t agFrameHandle,
1895 /*****************************************************************************
1896 *! \brief satRequestSenseCB
1898 * This routine is a callback function called from ossaSATACompleted().
1899 * This CB routine deals with Request Sense completion.
1901 * \param agRoot: Handles for this instance of SAS/SATA hardware
1902 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
1903 * \param agIOStatus: Status of completed I/O.
1904 * \param agSATAParm1: Additional info based on status.
1905 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
1907 * \param ioContext: Pointer to satIOContext_t.
1911 *****************************************************************************/
1912 void satRequestSenseCB(
1914 agsaIORequest_t *agIORequest,
1916 agsaFisHeader_t *agFirstDword,
1918 agsaFrameHandle_t agFrameHandle,
1921 /*****************************************************************************
1922 *! \brief satStartStopUnitCB
1924 * This routine is a callback function called from ossaSATACompleted().
1925 * This CB routine deals with Send Diagnostic completion.
1927 * \param agRoot: Handles for this instance of SAS/SATA hardware
1928 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
1929 * \param agIOStatus: Status of completed I/O.
1930 * \param agSATAParm1: Additional info based on status.
1931 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
1933 * \param ioContext: Pointer to satIOContext_t.
1937 *****************************************************************************/
1938 void satStartStopUnitCB(
1940 agsaIORequest_t *agIORequest,
1942 agsaFisHeader_t *agFirstDword,
1944 agsaFrameHandle_t agFrameHandle,
1947 /*****************************************************************************
1948 *! \brief satVerify10CB
1950 * This routine is a callback function called from ossaSATACompleted().
1951 * This CB routine deals with Verify(10) completion.
1953 * \param agRoot: Handles for this instance of SAS/SATA hardware
1954 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
1955 * \param agIOStatus: Status of completed I/O.
1956 * \param agSATAParm1: Additional info based on status.
1957 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
1959 * \param ioContext: Pointer to satIOContext_t.
1963 *****************************************************************************/
1966 agsaIORequest_t *agIORequest,
1968 agsaFisHeader_t *agFirstDword,
1970 agsaFrameHandle_t agFrameHandle,
1974 void satNonChainedVerifyCB(
1976 agsaIORequest_t *agIORequest,
1978 agsaFisHeader_t *agFirstDword,
1980 agsaFrameHandle_t agFrameHandle,
1984 void satChainedVerifyCB(
1986 agsaIORequest_t *agIORequest,
1988 agsaFisHeader_t *agFirstDword,
1990 agsaFrameHandle_t agFrameHandle,
1994 /*****************************************************************************
1995 *! \brief satTmResetLUN
1997 * This routine is called to initiate a TM RESET LUN request to SATL.
1998 * This routine is independent of HW/LL API.
2000 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2001 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
2002 * \param lun: Pointer to LUN.
2003 * \param currentTaskTag: Pointer to tag/context for this TM request.
2007 * \e tiSuccess: I/O request successfully initiated.
2008 * \e tiBusy: No resources available, try again later.
2009 * \e tiIONoDevice: Invalid device handle.
2010 * \e tiError: Other errors that prevent the I/O request to be started.
2013 *****************************************************************************/
2014 osGLOBAL bit32 satTmResetLUN(
2016 tiIORequest_t *tiIORequest,
2017 tiDeviceHandle_t *tiDeviceHandle,
2018 tiScsiInitiatorRequest_t *tiScsiRequest,
2019 satIOContext_t *satIOContext,
2022 osGLOBAL bit32 satTmWarmReset(
2024 tiIORequest_t *tiIORequest,
2025 tiDeviceHandle_t *tiDeviceHandle,
2026 tiScsiInitiatorRequest_t *tiScsiRequest,
2027 satIOContext_t *satIOContext);
2029 osGLOBAL bit32 satTDInternalTmReset(
2031 tiIORequest_t *tiIORequest,
2032 tiDeviceHandle_t *tiDeviceHandle,
2033 tiScsiInitiatorRequest_t *tiScsiRequest,
2034 satIOContext_t *satIOContext);
2036 /*****************************************************************************
2037 *! \brief satTmAbortTask
2039 * This routine is called to initiate a TM ABORT TASK request to SATL.
2040 * This routine is independent of HW/LL API.
2042 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2043 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
2044 * \param taskTag: Pointer to the associated task where the TM
2045 * command is to be applied.
2046 * \param currentTaskTag: Pointer to tag/context for this TM request.
2050 * \e tiSuccess: I/O request successfully initiated.
2051 * \e tiBusy: No resources available, try again later.
2052 * \e tiIONoDevice: Invalid device handle.
2053 * \e tiError: Other errors that prevent the I/O request to be started.
2056 *****************************************************************************/
2057 osGLOBAL bit32 satTmAbortTask(
2059 tiIORequest_t *tiIORequest,
2060 tiDeviceHandle_t *tiDeviceHandle,
2061 tiScsiInitiatorRequest_t *tiScsiRequest,
2062 satIOContext_t *satIOContext,
2063 tiIORequest_t *taskTag);
2065 /*****************************************************************************
2066 *! \brief osSatResetCB
2068 * This routine is called to notify the completion of SATA device reset
2069 * which was initiated previously through the call to sataLLReset().
2070 * This routine is independent of HW/LL API.
2072 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2073 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
2074 * \param resetStatus: Reset status either tiSuccess or tiError.
2075 * \param respFis: Pointer to the Register Device-To-Host FIS
2076 * received from the device.
2080 *****************************************************************************/
2082 osGLOBAL void osSatResetCB(
2084 tiDeviceHandle_t *tiDeviceHandle,
2089 ossaSATADeviceResetCB(
2091 agsaDevHandle_t *agDevHandle,
2095 /*****************************************************************************
2096 *! \brief osSatIOCompleted
2098 * This routine is a callback for SATA completion that required FIS status
2099 * translation to SCSI status.
2101 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2102 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
2103 * \param respFis: Pointer to status FIS to read.
2104 * \param respFisLen: Length of response FIS to read.
2105 * \param satIOContext: Pointer to SAT context.
2106 * \param interruptContext: Interrupt context
2110 *****************************************************************************/
2111 osGLOBAL void osSatIOCompleted(
2113 tiIORequest_t *tiIORequest,
2114 agsaFisHeader_t *agFirstDword,
2116 agsaFrameHandle_t agFrameHandle,
2117 satIOContext_t *satIOContext,
2118 bit32 interruptContext);
2121 /*****************************************************************************
2122 *! \brief tdssAddSataToSharedcontext
2124 * Purpose: This function adds a discovered SATA device to a device list of
2127 * \param tdsaPortContext Pointer to a port context
2128 * \param tdsaDeviceData Pointer to a device data
2129 * \param tsddPortContext_Instance Pointer to the target port context
2130 * \param agRoot Pointer to the root data structure of
2131 * TD and Lower layer
2132 * \param agDevHandle Pointer to a device handle
2133 * \param agSATADeviceInfo Pointer to SATA device info structure
2137 *****************************************************************************/
2139 tdssRemoveSATAFromSharedcontext(
2140 tdsaPortContext_t *tdsaPortContext_Ins,
2141 tdsaDeviceData_t *tdsaDeviceData_ins,
2145 /*****************************************************************************/
2146 /*! \brief SAT default ATA status and ATA error translation to SCSI.
2148 * SSAT default ATA status and ATA error translation to SCSI.
2150 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2151 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
2152 * \param satIOContext: Pointer to the SAT IO Context
2153 * \param pSense: Pointer to scsiRspSense_t
2154 * \param ataStatus: ATA status register
2155 * \param ataError: ATA error register
2156 * \param interruptContext: Interrupt context
2160 /*****************************************************************************/
2162 GLOBAL void osSatDefaultTranslation(
2164 tiIORequest_t *tiIORequest,
2165 satIOContext_t *satIOContext,
2166 scsiRspSense_t *pSense,
2169 bit32 interruptContext );
2171 /*****************************************************************************/
2172 /*! \brief Allocate resource for SAT intervally generated I/O.
2174 * Allocate resource for SAT intervally generated I/O.
2176 * \param tiRoot: Pointer to TISA driver/port instance.
2177 * \param satDevData: Pointer to SAT specific device data.
2178 * \param allocLength: Length in byte of the DMA mem to allocate, upto
2180 * \param satIntIo: Pointer (output) to context for SAT internally
2181 * generated I/O that is allocated by this routine.
2183 * \return If command is started successfully
2184 * - \e tiSuccess: Success.
2185 * - \e tiError: Failed allocating resource.
2187 /*****************************************************************************/
2188 GLOBAL satInternalIo_t * satAllocIntIoResource(
2190 tiIORequest_t *tiIORequest,
2191 satDeviceData_t *satDevData,
2192 bit32 dmaAllocLength,
2193 satInternalIo_t *satIntIo);
2195 /*****************************************************************************/
2196 /*! \brief Send READ LOG EXT ATA PAGE 10h command to sata drive.
2198 * Send READ LOG EXT ATA command PAGE 10h request to LL layer.
2200 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2201 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
2202 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
2203 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
2204 * \param satIOContext_t: Pointer to the SAT IO Context
2206 * \return If command is started successfully
2207 * - \e tiSuccess: I/O request successfully initiated.
2208 * - \e tiBusy: No resources available, try again later.
2209 * - \e tiIONoDevice: Invalid device handle.
2210 * - \e tiError: Other errors.
2212 /*****************************************************************************/
2213 GLOBAL bit32 satSendReadLogExt(
2215 tiIORequest_t *tiIORequest,
2216 tiDeviceHandle_t *tiDeviceHandle,
2217 tiScsiInitiatorRequest_t *tiScsiRequest,
2218 satIOContext_t *satIOContext);
2221 /*****************************************************************************/
2222 /*! \brief SAT implementation for SCSI satReadMediaSerialNumber.
2224 * SAT implementation for SCSI Read Media Serial Number.
2226 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2227 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
2228 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
2229 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
2230 * \param satIOContext_t: Pointer to the SAT IO Context
2232 * \return If command is started successfully
2233 * - \e tiSuccess: I/O request successfully initiated.
2234 * - \e tiBusy: No resources available, try again later.
2235 * - \e tiIONoDevice: Invalid device handle.
2236 * - \e tiError: Other errors.
2238 /*****************************************************************************/
2239 GLOBAL bit32 satReadMediaSerialNumber(
2241 tiIORequest_t *tiIORequest,
2242 tiDeviceHandle_t *tiDeviceHandle,
2243 tiScsiInitiatorRequest_t *tiScsiRequest,
2244 satIOContext_t *satIOContext);
2246 /*****************************************************************************
2247 *! \brief satReadMediaSerialNumberCB
2249 * This routine is a callback function called from ossaSATACompleted().
2250 * This CB routine deals with Read Media Serial Number completion.
2252 * \param agRoot: Handles for this instance of SAS/SATA hardware
2253 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
2254 * \param agIOStatus: Status of completed I/O.
2255 * \param agSATAParm1: Additional info based on status.
2256 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
2258 * \param ioContext: Pointer to satIOContext_t.
2262 *****************************************************************************/
2263 void satReadMediaSerialNumberCB(
2265 agsaIORequest_t *agIORequest,
2267 agsaFisHeader_t *agFirstDword,
2269 agsaFrameHandle_t agFrameHandle,
2273 /*****************************************************************************/
2274 /*! \brief SAT implementation for SCSI satReadBuffer.
2276 * SAT implementation for SCSI Read Buffer.
2278 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2279 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
2280 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
2281 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
2282 * \param satIOContext_t: Pointer to the SAT IO Context
2284 * \return If command is started successfully
2285 * - \e tiSuccess: I/O request successfully initiated.
2286 * - \e tiBusy: No resources available, try again later.
2287 * - \e tiIONoDevice: Invalid device handle.
2288 * - \e tiError: Other errors.
2290 /*****************************************************************************/
2291 GLOBAL bit32 satReadBuffer(
2293 tiIORequest_t *tiIORequest,
2294 tiDeviceHandle_t *tiDeviceHandle,
2295 tiScsiInitiatorRequest_t *tiScsiRequest,
2296 satIOContext_t *satIOContext);
2298 /*****************************************************************************
2299 *! \brief satReadBufferCB
2301 * This routine is a callback function called from ossaSATACompleted().
2302 * This CB routine deals with Read Buffer.
2304 * \param agRoot: Handles for this instance of SAS/SATA hardware
2305 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
2306 * \param agIOStatus: Status of completed I/O.
2307 * \param agSATAParm1: Additional info based on status.
2308 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
2310 * \param ioContext: Pointer to satIOContext_t.
2314 *****************************************************************************/
2315 void satReadBufferCB(
2317 agsaIORequest_t *agIORequest,
2319 agsaFisHeader_t *agFirstDword,
2321 agsaFrameHandle_t agFrameHandle,
2325 /*****************************************************************************/
2326 /*! \brief SAT implementation for SCSI satWriteBuffer.
2328 * SAT implementation for SCSI Write Buffer.
2330 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2331 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
2332 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
2333 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
2334 * \param satIOContext_t: Pointer to the SAT IO Context
2336 * \return If command is started successfully
2337 * - \e tiSuccess: I/O request successfully initiated.
2338 * - \e tiBusy: No resources available, try again later.
2339 * - \e tiIONoDevice: Invalid device handle.
2340 * - \e tiError: Other errors.
2342 /*****************************************************************************/
2343 GLOBAL bit32 satWriteBuffer(
2345 tiIORequest_t *tiIORequest,
2346 tiDeviceHandle_t *tiDeviceHandle,
2347 tiScsiInitiatorRequest_t *tiScsiRequest,
2348 satIOContext_t *satIOContext);
2350 /*****************************************************************************
2351 *! \brief satWriteBufferCB
2353 * This routine is a callback function called from ossaSATACompleted().
2354 * This CB routine deals with Write Buffer.
2356 * \param agRoot: Handles for this instance of SAS/SATA hardware
2357 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
2358 * \param agIOStatus: Status of completed I/O.
2359 * \param agSATAParm1: Additional info based on status.
2360 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
2362 * \param ioContext: Pointer to satIOContext_t.
2366 *****************************************************************************/
2367 void satWriteBufferCB(
2369 agsaIORequest_t *agIORequest,
2371 agsaFisHeader_t *agFirstDword,
2373 agsaFrameHandle_t agFrameHandle,
2377 /*****************************************************************************/
2378 /*! \brief SAT implementation for SCSI satReassignBlocks.
2380 * SAT implementation for SCSI Reassign Blocks.
2382 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2383 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
2384 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
2385 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
2386 * \param satIOContext_t: Pointer to the SAT IO Context
2388 * \return If command is started successfully
2389 * - \e tiSuccess: I/O request successfully initiated.
2390 * - \e tiBusy: No resources available, try again later.
2391 * - \e tiIONoDevice: Invalid device handle.
2392 * - \e tiError: Other errors.
2394 /*****************************************************************************/
2395 GLOBAL bit32 satReassignBlocks(
2397 tiIORequest_t *tiIORequest,
2398 tiDeviceHandle_t *tiDeviceHandle,
2399 tiScsiInitiatorRequest_t *tiScsiRequest,
2400 satIOContext_t *satIOContext);
2402 /*****************************************************************************
2403 *! \brief satReassignBlocksCB
2405 * This routine is a callback function called from ossaSATACompleted().
2406 * This CB routine deals with Reassign Blocks.
2408 * \param agRoot: Handles for this instance of SAS/SATA hardware
2409 * \param agIORequest: Pointer to the LL I/O request context for this I/O.
2410 * \param agIOStatus: Status of completed I/O.
2411 * \param agSATAParm1: Additional info based on status.
2412 * \param agIOInfoLen: Length in bytes of overrun/underrun residual or FIS
2414 * \param ioContext: Pointer to satIOContext_t.
2418 *****************************************************************************/
2419 void satReassignBlocksCB(
2421 agsaIORequest_t *agIORequest,
2423 agsaFisHeader_t *agFirstDword,
2425 agsaFrameHandle_t agFrameHandle,
2429 /*****************************************************************************/
2430 /*! \brief SAT implementation for SCSI satReassignBlocks_1.
2432 * SAT implementation for SCSI Reassign Blocks. This is helper function for
2433 * satReassignBlocks and satReassignBlocksCB. This sends ATA verify command.
2435 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2436 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
2437 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
2438 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
2439 * \param satIOContext_t: Pointer to the SAT IO Context
2441 * \return If command is started successfully
2442 * - \e tiSuccess: I/O request successfully initiated.
2443 * - \e tiBusy: No resources available, try again later.
2444 * - \e tiIONoDevice: Invalid device handle.
2445 * - \e tiError: Other errors.
2447 /*****************************************************************************/
2448 GLOBAL bit32 satReassignBlocks_1(
2450 tiIORequest_t *tiIORequest,
2451 tiDeviceHandle_t *tiDeviceHandle,
2452 tiScsiInitiatorRequest_t *tiScsiRequest,
2453 satIOContext_t *satIOContext,
2454 satIOContext_t *satOrgIOContext);
2456 /*****************************************************************************/
2457 /*! \brief SAT implementation for SCSI satReassignBlocks_2.
2459 * SAT implementation for SCSI Reassign Blocks. This is helper function for
2460 * satReassignBlocks and satReassignBlocksCB. This sends ATA write command.
2462 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2463 * \param tiIORequest: Pointer to TISA I/O request context for this I/O.
2464 * \param tiDeviceHandle: Pointer to TISA device handle for this I/O.
2465 * \param tiScsiRequest: Pointer to TISA SCSI I/O request and SGL list.
2466 * \param satIOContext_t: Pointer to the SAT IO Context
2467 * \param LBA: Pointer to the LBA to be processed
2469 * \return If command is started successfully
2470 * - \e tiSuccess: I/O request successfully initiated.
2471 * - \e tiBusy: No resources available, try again later.
2472 * - \e tiIONoDevice: Invalid device handle.
2473 * - \e tiError: Other errors.
2475 /*****************************************************************************/
2476 GLOBAL bit32 satReassignBlocks_2(
2478 tiIORequest_t *tiIORequest,
2479 tiDeviceHandle_t *tiDeviceHandle,
2480 tiScsiInitiatorRequest_t *tiScsiRequest,
2481 satIOContext_t *satIOContext,
2485 /*****************************************************************************/
2486 /*! \brief SAT implementation for SCSI satPrepareNewIO.
2488 * This function fills in the fields of internal IO generated by TD layer.
2489 * This is mostly used in the callback functions.
2491 * \param satNewIntIo: Pointer to the internal IO structure.
2492 * \param tiOrgIORequest: Pointer to the original tiIOrequest sent by OS layer
2493 * \param satDevData: Pointer to the device data.
2494 * \param scsiCmnd: Pointer to SCSI command.
2495 * \param satOrgIOContext: Pointer to the original SAT IO Context
2498 * - \e Pointer to the new SAT IO Context
2500 /*****************************************************************************/
2501 GLOBAL satIOContext_t *satPrepareNewIO(
2502 satInternalIo_t *satNewIntIo,
2503 tiIORequest_t *tiOrgIORequest,
2504 satDeviceData_t *satDevData,
2505 tiIniScsiCmnd_t *scsiCmnd,
2506 satIOContext_t *satOrgIOContext
2509 /*****************************************************************************
2510 *! \brief sataLLIOAbort
2512 * This routine is called to initiate an I/O abort to LL layer.
2513 * This function implements/encapsulates HW and LL API dependency.
2515 * \param tiRoot: Pointer to TISA initiator driver/port instance.
2516 * \param taskTag: Pointer to TISA I/O context to be aborted.
2520 * \e tiSuccess: Abort request was successfully initiated.
2521 * \e tiBusy: No resources available, try again later.
2522 * \e tiError: Other errors that prevent the abort request from being
2526 *****************************************************************************/
2528 GLOBAL bit32 sataLLIOAbort (
2530 tiIORequest_t *taskTag );
2536 agsaIORequest_t *agIORequest,
2538 agsaFisHeader_t *agFirstDword,
2540 agsaFrameHandle_t agFrameHandle,
2544 void satInquiryIntCB(
2546 tiIORequest_t *tiIORequest,
2547 tiDeviceHandle_t *tiDeviceHandle,
2548 tiScsiInitiatorRequest_t *tiScsiRequest,
2549 satIOContext_t *satIOContext
2552 GLOBAL bit32 satSendIDDev(
2554 tiIORequest_t *tiIORequest,
2555 tiDeviceHandle_t *tiDeviceHandle,
2556 tiScsiInitiatorRequest_t *tiScsiRequest,
2557 satIOContext_t *satIOContext);
2560 GLOBAL bit32 satStartIDDev(
2562 tiIORequest_t *tiIORequest,
2563 tiDeviceHandle_t *tiDeviceHandle,
2564 tiScsiInitiatorRequest_t *tiScsiRequest,
2565 satIOContext_t *satIOContext
2569 satDeviceData_t *satDevData,
2570 agsaSATAIdentifyData_t *SATAIdData
2573 GLOBAL bit32 satAddSATAStartIDDev(
2575 tiIORequest_t *tiIORequest,
2576 tiDeviceHandle_t *tiDeviceHandle,
2577 tiScsiInitiatorRequest_t *tiScsiRequest,
2578 satIOContext_t *satIOContext
2581 GLOBAL bit32 satAddSATASendIDDev(
2583 tiIORequest_t *tiIORequest,
2584 tiDeviceHandle_t *tiDeviceHandle,
2585 tiScsiInitiatorRequest_t *tiScsiRequest,
2586 satIOContext_t *satIOContext
2589 void satAddSATAIDDevCB(
2591 agsaIORequest_t *agIORequest,
2593 agsaFisHeader_t *agFirstDword,
2595 agsaFrameHandle_t agFrameHandle,
2599 void satAddSATAIDDevCBReset(
2601 tdsaDeviceData_t *oneDeviceData,
2602 satIOContext_t *satIOContext,
2603 tdIORequestBody_t *tdIORequestBody
2606 void satAddSATAIDDevCBCleanup(
2608 tdsaDeviceData_t *oneDeviceData,
2609 satIOContext_t *satIOContext,
2610 tdIORequestBody_t *tdIORequestBody
2613 GLOBAL bit32 tdsaDiscoveryIntStartIDDev(
2615 tiIORequest_t *tiIORequest,
2616 tiDeviceHandle_t *tiDeviceHandle,
2617 tiScsiInitiatorRequest_t *tiScsiRequest,
2618 satIOContext_t *satIOContext
2621 GLOBAL bit32 tdsaDiscoverySendIDDev(
2623 tiIORequest_t *tiIORequest,
2624 tiDeviceHandle_t *tiDeviceHandle,
2625 tiScsiInitiatorRequest_t *tiScsiRequest,
2626 satIOContext_t *satIOContext
2629 void tdsaDiscoveryStartIDDevCB(
2631 agsaIORequest_t *agIORequest,
2633 agsaFisHeader_t *agFirstDword,
2635 agsaFrameHandle_t agFrameHandle,
2644 bit32 satComputeCDB10LBA(satIOContext_t *satIOContext);
2645 bit32 satComputeCDB10TL(satIOContext_t *satIOContext);
2646 bit32 satComputeCDB12LBA(satIOContext_t *satIOContext);
2647 bit32 satComputeCDB12TL(satIOContext_t *satIOContext);
2648 bit32 satComputeCDB16LBA(satIOContext_t *satIOContext);
2649 bit32 satComputeCDB16TL(satIOContext_t *satIOContext);
2650 bit32 satComputeLoopNum(bit32 a,
2652 bit32 satAddNComparebit64(bit8 *a, bit8 *b);
2653 bit32 satAddNComparebit32(bit8 *a, bit8 *b);
2654 bit32 satCompareLBALimitbit(bit8 *lba);
2656 /*****************************************************************************
2658 * Purpose: bitwise set
2661 * data - input output buffer
2662 * index - bit to set
2667 *****************************************************************************/
2669 satBitSet(bit8 *data, bit32 index);
2671 /*****************************************************************************
2673 * Purpose: bitwise clear
2676 * data - input output buffer
2677 * index - bit to clear
2682 *****************************************************************************/
2684 satBitClear(bit8 *data, bit32 index);
2686 /*****************************************************************************
2688 * Purpose: bitwise test
2691 * data - input output buffer
2692 * index - bit to test
2698 *****************************************************************************/
2700 satBitTest(bit8 *data, bit32 index);
2702 /******************************************************************************/
2703 /*! \brief allocate an available SATA tag
2705 * allocate an available SATA tag
2707 * \param pSatDevData
2710 * \return -Success or fail-
2712 /*******************************************************************************/
2713 GLOBAL bit32 satTagAlloc(
2715 satDeviceData_t *pSatDevData,
2719 /******************************************************************************/
2720 /*! \brief release an SATA tag
2722 * release an available SATA tag
2724 * \param pSatDevData
2728 /*******************************************************************************/
2729 GLOBAL bit32 satTagRelease(
2731 satDeviceData_t *pSatDevData,
2736 satDecrementPendingIO(
2738 tdsaContext_t *tdsaAllShared,
2739 satIOContext_t *satIOContext
2742 GLOBAL bit32 satStartResetDevice(
2744 tiIORequest_t *tiIORequest,
2745 tiDeviceHandle_t *tiDeviceHandle,
2746 tiScsiInitiatorRequest_t *tiScsiRequest,
2747 satIOContext_t *satIOContext
2750 GLOBAL bit32 satResetDevice(
2752 tiIORequest_t *tiIORequest,
2753 tiDeviceHandle_t *tiDeviceHandle,
2754 tiScsiInitiatorRequest_t *tiScsiRequest,
2755 satIOContext_t *satIOContext
2758 GLOBAL void satResetDeviceCB(
2760 agsaIORequest_t *agIORequest,
2762 agsaFisHeader_t *agFirstDword,
2764 agsaFrameHandle_t agFrameHandle,
2768 osGLOBAL bit32 satSubTM(
2770 tiDeviceHandle_t *tiDeviceHandle,
2773 tiIORequest_t *taskTag,
2774 tiIORequest_t *currentTaskTag,
2778 GLOBAL bit32 satStartDeResetDevice(
2780 tiIORequest_t *tiIORequest,
2781 tiDeviceHandle_t *tiDeviceHandle,
2782 tiScsiInitiatorRequest_t *tiScsiRequest,
2783 satIOContext_t *satIOContext
2786 GLOBAL bit32 satDeResetDevice(
2788 tiIORequest_t *tiIORequest,
2789 tiDeviceHandle_t *tiDeviceHandle,
2790 tiScsiInitiatorRequest_t *tiScsiRequest,
2791 satIOContext_t *satIOContext
2795 GLOBAL void satDeResetDeviceCB(
2797 agsaIORequest_t *agIORequest,
2799 agsaFisHeader_t *agFirstDword,
2801 agsaFrameHandle_t agFrameHandle,
2806 GLOBAL bit32 satStartCheckPowerMode(
2808 tiIORequest_t *tiIORequest,
2809 tiDeviceHandle_t *tiDeviceHandle,
2810 tiScsiInitiatorRequest_t *tiScsiRequest,
2811 satIOContext_t *satIOContext
2814 GLOBAL bit32 satCheckPowerMode(
2816 tiIORequest_t *tiIORequest,
2817 tiDeviceHandle_t *tiDeviceHandle,
2818 tiScsiInitiatorRequest_t *tiScsiRequest,
2819 satIOContext_t *satIOContext
2822 GLOBAL void satCheckPowerModeCB(
2824 agsaIORequest_t *agIORequest,
2826 agsaFisHeader_t *agFirstDword,
2828 agsaFrameHandle_t agFrameHandle,
2832 GLOBAL void satAbort(agsaRoot_t *agRoot,
2833 satIOContext_t *satIOContext
2836 GLOBAL void satTranslateATAPIErrorsToSCSIErrors(
2841 bit16 *pSenseCodeInfo
2845 satSATADeviceReset(tiRoot_t *tiRoot,
2846 tdsaDeviceData_t *oneDeviceData,
2851 satSATADeviceReset( tiRoot_t *tiRoot,
2852 tdsaDeviceData_t *oneDeviceData,
2856 #endif /*__SATPROTO_H__ */