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 /******************************************************************************
25 PMC-Sierra TISA Initiator Device Driver for Linux 2.x.x.
30 Linux iSCSI/FC Initiator driver module itsdk required OS functions
32 Part of oslayer module, Kernel or loadable module
34 *******************************************************************************
38 TI layer call back to OSlayer to inform events
40 tiRoot_t *ptiRoot (IN) Pointer to HBA data structure
41 tiDeviceHandle_t *ptiDevHandle (IN) Pointer to device handle
42 tiIntrEvenType_t evenType (IN) Event type
43 tiIntrEventStatus_t evetStatus (IN) Event status
44 void *parm (IN) pointer to even specific data
47 TBD, further event process required.
48 ******************************************************************************/
49 void ostiInitiatorEvent( tiRoot_t *ptiRoot,
50 tiPortalContext_t *ptiPortalContext,
51 tiDeviceHandle_t *ptiDevHandle,
52 tiIntrEventType_t eventType,
56 ag_portal_data_t *pPortalData;
57 ag_portal_info_t *pPortalInfo;
58 struct agtiapi_softc *pCard = TIROOT_TO_CARD( ptiRoot );
63 #ifdef AGTIAPI_EVENT_LOG
64 AGTIAPI_PRINTK("Initiator Event:\n");
65 AGTIAPI_PRINTK("DevHandle %p, eventType 0x%x, eventStatus 0x%x\n",
66 ptiDevHandle, eventType, eventStatus);
67 AGTIAPI_PRINTK("Parameter: %s\n", (char *)parm);
70 AGTIAPI_PRINTK("ostiInitiatorEvent: eventType 0x%x eventStatus 0x%x\n", eventType, eventStatus);
74 case tiIntrEventTypeCnxError:
75 if (eventStatus == tiCnxUp)
77 AGTIAPI_PRINTK("tiIntrEventTypeCnxError - tiCnxUp!\n");
79 if (eventStatus == tiCnxDown)
81 AGTIAPI_PRINTK("tiIntrEventTypeCnxError - tiCnxDown!\n");
84 case tiIntrEventTypeDiscovery:
85 pPortalData = PORTAL_CONTEXT_TO_PORTALDATA(ptiPortalContext);
86 pCard->flags |= AGTIAPI_CB_DONE;
87 if (eventStatus == tiDiscOK)
89 AGTIAPI_PRINTK("eventStatus - tiDiscOK\n");
90 AGTIAPI_PRINTK("ostiInitiatorEvent: pcard %d eventStatus - tiDiscOK\n", pCard->cardNo );
91 PORTAL_STATUS(pPortalData) |= AGTIAPI_DISC_COMPLETE;
92 #ifndef HOTPLUG_SUPPORT
93 if (!(pCard->flags & AGTIAPI_INIT_TIME))
99 agtiapi_GetDevHandle(pCard, &pPortalData->portalInfo,
100 tiIntrEventTypeDiscovery, tiDiscOK);
101 PORTAL_STATUS(pPortalData) |=
102 (AGTIAPI_DISC_DONE | AGTIAPI_PORT_LINK_UP);
104 /* Trigger CheckIOTimeout */
105 callout_reset(&pCard->IO_timer, 20*hz, agtiapi_CheckIOTimeout, pCard);
107 else if (eventStatus == tiDiscFailed)
109 AGTIAPI_PRINTK("eventStatus - tiDiscFailed\n");
110 agtiapi_GetDevHandle(pCard, &pPortalData->portalInfo,
111 tiIntrEventTypeDiscovery, tiDiscFailed);
112 PORTAL_STATUS(pPortalData) &= ~AGTIAPI_DISC_DONE;
114 AGTIAPI_PRINTK("tiIntrEventTypeDiscovery - portal %p, status 0x%x\n",
116 PORTAL_STATUS(pPortalData));
118 case tiIntrEventTypeDeviceChange:
119 AGTIAPI_PRINTK("tiIntrEventTypeDeviceChange - portal %p es %d\n",
120 ptiPortalContext->osData, eventStatus);
121 pPortalData = PORTAL_CONTEXT_TO_PORTALDATA(ptiPortalContext);
122 pPortalInfo = &pPortalData->portalInfo;
123 #ifndef HOTPLUG_SUPPORT
124 if (!(pCard->flags & AGTIAPI_INIT_TIME))
129 agtiapi_GetDevHandle(pCard, pPortalInfo, tiIntrEventTypeDeviceChange,
131 // agtiapi_StartIO(pCard);
134 case tiIntrEventTypeTransportRecovery:
135 AGTIAPI_PRINTK("tiIntrEventTypeTransportRecovery!\n");
137 case tiIntrEventTypeTaskManagement:
138 AGTIAPI_PRINTK("tiIntrEventTypeTaskManagement!\n");
139 pccb = (pccb_t)((tiIORequest_t *)parm)->osData;
140 if (pccb->flags & TASK_TIMEOUT)
142 AGTIAPI_PRINTK("tiIntrEventTypeTaskManagement: TM timeout!\n");
143 agtiapi_FreeTMCCB(pCard, pccb);
147 pccb->flags |= AGTIAPI_CB_DONE;
148 if (eventStatus == tiTMOK)
150 pccb->flags |= TASK_SUCCESS;
151 AGTIAPI_PRINTK("tiIntrEventTypeTaskManagement: pTMccb %p flag %x \n",
154 /* Incase of TM_DEV_RESET, issue LocalAbort to abort pending IO */
155 if (pccb->flags & DEV_RESET)
157 AGTIAPI_PRINTK("tiIntrEventTypeTaskManagement: Target Reset\n");
158 ccbIO = pccb->pccbIO;
159 AGTIAPI_PRINTK("tiIntrEventTypeTaskManagement: IO to be aborted locally %p flag %x \n",
160 ccbIO, ccbIO->flags);
161 if (ccbIO->startTime == 0) /* IO has been completed. No local abort */
164 else if (tiINIIOAbort(&pCard->tiRoot, &ccbIO->tiIORequest) != tiSuccess)
166 AGTIAPI_PRINTK("tiIntrEventTypeTaskManagement: Local Abort failed\n");
167 /* TODO: call Soft reset here */
170 else if (eventStatus == tiTMFailed)
172 ccbIO = pccb->pccbIO;
173 if (ccbIO->startTime == 0) /* IO has been completed. */
175 AGTIAPI_PRINTK("tiIntrEventTypeTaskManagement: TM failed becasue IO has been completed! pTMccb %p flag %x \n",
180 AGTIAPI_PRINTK("tiIntrEventTypeTaskManagement: TM failed! pTMccb %p flag %x \n",
183 /* if TM_ABORT_TASK, call TM_TARGET_RESET */
184 /* if TM_TARGET_RESET, call Soft_Reset */
187 /* Free TM_DEV_RESET ccb */
188 agtiapi_FreeTMCCB(pCard, pccb);
192 case tiIntrEventTypeLocalAbort:
193 AGTIAPI_PRINTK("tiIntrEventTypeLocalAbort!\n");
194 pccb = (pccb_t)((tiIORequest_t *)parm)->osData;
195 pccb->flags |= AGTIAPI_CB_DONE;
196 if (eventStatus == tiAbortOK)
198 AGTIAPI_PRINTK("tiIntrEventTypeLocalAbort: taskTag pccb %p flag %x \n",
200 /* If this was LocalAbort for TM ABORT_TASK, issue TM_DEV_RESET */
201 if (pccb->flags & TASK_MANAGEMENT)
203 if ((pTMccb = agtiapi_GetCCB(pCard)) == NULL)
205 AGTIAPI_PRINTK("tiIntrEventTypeLocalAbort: TM resource unavailable!\n");
206 /* TODO: SoftReset here? */
208 pTMccb->pmcsc = pCard;
209 pTMccb->targetId = pccb->targetId;
210 pTMccb->devHandle = pccb->devHandle;
212 /* save pending io to issue local abort at Task mgmt CB */
213 pTMccb->pccbIO = pccb->pccbIO;
214 pTMccb->flags &= ~(TASK_SUCCESS | ACTIVE);
215 pTMccb->flags |= DEV_RESET;
216 if (tiINITaskManagement(&pCard->tiRoot,
218 AG_TARGET_WARM_RESET,
219 &pccb->tiSuperScsiRequest.scsiCmnd.lun,
221 &pTMccb->tiIORequest)
224 AGTIAPI_PRINTK("tiIntrEventTypeLocalAbort: TM_TARGET_RESET request success ccb %p, pTMccb %p\n",
226 pTMccb->startTime = ticks;
230 AGTIAPI_PRINTK("tiIntrEventTypeLocalAbort: TM_TARGET_RESET request failed ccb %p, pTMccb %p\n",
232 agtiapi_FreeTMCCB(pCard, pTMccb);
233 /* TODO: SoftReset here? */
235 /* Free ABORT_TASK TM ccb */
236 agtiapi_FreeTMCCB(pCard, pccb);
239 else if (eventStatus == tiAbortFailed)
242 /* If TM_ABORT_TASK fails, issue TM_DEV_RESET */
243 /* if TM_DEV_RESET fails, issue Soft_Reset */
244 AGTIAPI_PRINTK("tiIntrEventTypeLocalAbort: Abort Failed pccb %p\n", pccb);
248 AGTIAPI_PRINTK("tiIntrEventType default!\n");
254 /******************************************************************************
255 ostiInitiatorIOCompleted()
258 IO request completion call back
260 tiRoot_t *ptiRoot (IN) Pointer to the HBA tiRoot
261 tiIORequest_t *ptiIORequest (IN) Pointer to the tiIORequest structure
262 tiIOStatus_t IOStatus (IN) I/O complated status
263 U32 statusDetail (IN) Additional information on status
264 tiSenseData_t *pSensedata (IN) Sense data buffer pointer
265 U32 context (IN) Interrupt dealing context
268 ******************************************************************************/
270 ostiInitiatorIOCompleted(tiRoot_t *ptiRoot,
271 tiIORequest_t *ptiIORequest,
272 tiIOStatus_t IOStatus,
274 tiSenseData_t *pSenseData,
277 struct agtiapi_softc *pCard;
280 pCard = TIROOT_TO_CARD(ptiRoot);
281 pccb = (ccb_t *)ptiIORequest->osData;
283 AGTIAPI_IO( "ostiInitiatorIOCompleted: start\n" );
285 if (IOStatus == tiIODifError)
289 OSTI_OUT_ENTER(ptiRoot);
291 pccb->ccbStatus = (U16)IOStatus;
292 pccb->scsiStatus = statusDetail;
294 if ((IOStatus == tiIOSuccess) && (statusDetail == SCSI_CHECK_CONDITION))
296 if (pSenseData == (tiSenseData_t *)agNULL)
298 AGTIAPI_PRINTK( "ostiInitiatorIOCompleted: "
299 "check condition without sense data!\n" );
303 union ccb *ccb = pccb->ccb;
304 struct ccb_scsiio *csio = &ccb->csio;
306 if (pccb->senseLen > pSenseData->senseLen)
308 csio->sense_resid = pccb->senseLen - pSenseData->senseLen;
312 csio->sense_resid = 0;
314 sense_len = MIN( pSenseData->senseLen,
315 pccb->senseLen - csio->sense_resid );
316 bzero(&csio->sense_data, sizeof(&csio->sense_data));
317 AGTIAPI_PRINTK("ostiInitiatorIOCompleted: check condition copying\n");
318 memcpy( (void *)pccb->pSenseData,
319 pSenseData->senseData,
321 agtiapi_hexdump( "ostiInitiatorIOCompleted check condition",
322 (bit8 *)&csio->sense_data, sense_len );
325 if ((IOStatus == tiIOFailed) && (statusDetail == tiDetailAborted))
327 AGTIAPI_PRINTK("ostiInitiatorIOCompleted - aborted ccb %p, flag %x\n",
329 /* indicate aborted IO completion */
331 agtiapi_Done(pCard, pccb);
337 * SAS no data command does not trigger interrupt.
338 * Command is completed in tdlayer and IO completion is called directly.
339 * The completed IO therefore is not post processed.
340 * Flag is raised and TDTimer will check and process IO for SAS.
341 * This is a temporary solution. - Eddie, 07-17-2006
343 pCard->flags |= AGTIAPI_FLAG_UP;
345 pccb->flags |= REQ_DONE;
346 agtiapi_QueueCCB(pCard, &pCard->ccbDoneHead, &pCard->ccbDoneTail
347 AG_CARD_LOCAL_LOCK(&pCard->doneLock), pccb);
349 OSTI_OUT_LEAVE(ptiRoot);
352 #ifdef HIALEAH_ENCRYPTION
354 ostidisableEncryption(tiRoot_t *ptiRoot)
356 struct agtiapi_softc *pCard;
357 pCard = TIROOT_TO_CARD(ptiRoot);
358 pCard->encrypt=agFALSE;
362 osGLOBAL //FORCEINLINE
364 ostiGetDevHandleFromSasAddr(
366 unsigned char *sas_addr
372 ag_portal_data_t *pPortal = NULL;
373 tiDeviceHandle_t *devHandle = NULL;
374 struct agtiapi_softc *pCard = TIROOT_TO_CARD(root);
375 bit8 sas_addr_hi[4], sas_addr_lo[4];
380 sas_addr_hi[i] = sas_addr[3-i];
385 sas_addr_lo[i] = sas_addr[7-i];
388 /* Retrieve the handles for each portal */
389 for (x=0; x < pCard->portCount; x++)
391 pPortal = &pCard->pPortalData[x];
392 devHandle = tiINIGetExpDeviceHandleBySasAddress(&pCard->tiRoot,
393 &pPortal->portalInfo.tiPortalContext,
394 *(bit32*)sas_addr_hi,
395 *(bit32*)sas_addr_lo,
396 (bit32)1024/*gMaxTargets*/);
397 if(devHandle != NULL)
404 /******************************************************************************
405 ostiInitiatorSMPCompleted()
408 IO request completion call back
410 tiRoot_t *ptiRoot (IN) Pointer to the HBA tiRoot
411 tiIORequest_t *ptiSMPRequest (IN) Pointer to the SMP request structure
412 tiIOStatus_t IOStatus (IN) I/O complated status
413 U32 tiSMPInfoLen (IN) Number of bytes of response frame len
414 tiFrameHandle (IN) Handle that referes to response frame
415 U32 context (IN) Interrupt dealing context
418 ******************************************************************************/
420 ostiInitiatorSMPCompleted(tiRoot_t *ptiRoot,
421 tiIORequest_t *ptiSMPRequest,
422 tiSMPStatus_t smpStatus,
427 struct agtiapi_softc *pCard;
429 pCard = TIROOT_TO_CARD(ptiRoot);
430 pccb = (ccb_t *)ptiSMPRequest->osData;
432 AGTIAPI_PRINTK("ostiInitiatorSMPCompleted: start\n");
434 OSTI_OUT_ENTER(ptiRoot);
435 pccb->ccbStatus = (U16)smpStatus;
436 if(smpStatus != tiSMPSuccess)
438 AGTIAPI_PRINTK("ostiInitiatorSMPCompleted: SMP Error\n");
442 union ccb *ccb = pccb->ccb;
443 struct ccb_smpio *csmpio = &ccb->smpio;
444 memcpy(csmpio->smp_response, tiFrameHandle, tiSMPInfoLen);
445 csmpio->smp_response_len = tiSMPInfoLen;
446 agtiapi_hexdump("ostiInitiatorSMPCompleted: Responce Payload in CAM", (bit8 *)csmpio->smp_response, csmpio->smp_response_len);
448 pccb->flags |= REQ_DONE;
449 agtiapi_QueueCCB(pCard, &pCard->smpDoneHead, &pCard->smpDoneTail
450 AG_CARD_LOCAL_LOCK(&pCard->doneSMPLock), pccb);
451 AGTIAPI_PRINTK("ostiInitiatorSMPCompleted: Done\n");
452 OSTI_OUT_LEAVE(ptiRoot);
459 osti_FastIOCb(tiRoot_t *ptiRoot,
461 tiIOStatus_t IOStatus,
464 ccb_t *pccb = (ccb_t*)arg;
467 static int callNum = 0;
473 if ((callNum % CMDS_PER_IO_DUP) != 0)
478 pccb->ccbStatus = IOStatus;
479 pccb->scsiStatus = statusDetail;
481 /* pccb->pSenseData is copied already */
483 if (pccb->flags & AGTIAPI_ABORT)
485 AGTIAPI_PRINTK("agtiapi_SuperIOCb: aborted ccb %p, flag %x\n",
487 pccb->startTime = 0; /* indicate aborted IO completion */
491 pCard = TIROOT_TO_CARD(ptiRoot);
492 pccb->flags |= REQ_DONE;
493 agtiapi_QueueCCB(pCard, &pCard->ccbDoneHead, &pCard->ccbDoneTail
494 AG_CARD_LOCAL_LOCK(&pCard->doneLock), pccb);
497 } /* osti_FastIOCb */
501 /******************************************************************************
502 ostiSingleThreadedEnter()
505 Critical region code excution protection.
507 tiRoot_t *ptiRoot (IN) Pointer to tiRoot data structure
508 U32 queueId (IN) spinlock Id
511 Lock is held by oslayer.
512 ******************************************************************************/
514 ostiSingleThreadedEnter(tiRoot_t *ptiRoot, U32 queueId)
516 struct agtiapi_softc *pCard = TIROOT_TO_CARD(ptiRoot);
517 mtx_lock( &pCard->STLock[queueId] ); // review: need irq save? ##
521 /******************************************************************************
522 ostiSingleThreadedLeave()
525 Restore multi-threading environment.
527 tiRoot_t *ptiRoot (IN) Pointer to the tiRoot data structure
528 U32 queueId (IN) spinlock Id
531 Lock is held by oslayer.
532 ******************************************************************************/
534 ostiSingleThreadedLeave(tiRoot_t *ptiRoot, U32 queueId)
536 struct agtiapi_softc *pCard = TIROOT_TO_CARD(ptiRoot);
537 mtx_unlock( &pCard->STLock[queueId] ); // review: need irq restore? ##
541 osGLOBAL tiDeviceHandle_t*
542 ostiMapToDevHandle(tiRoot_t *root,
548 tiDeviceHandle_t *dev = NULL;
549 struct agtiapi_softc *pCard;
552 pCard = TIROOT_TO_CARD(root);
554 offset = pathId * pCard->tgtCount + targetId;
556 if (offset > (pCard->tgtCount - 1) )
562 dev = pCard->pDevList[offset].pDevHandle;
572 #ifdef AGTIAPI_LOCAL_LOCK
573 #define OSTI_SPIN_LOCK(lock) spin_lock(lock)
574 #define OSTI_SPIN_UNLOCK(lock) spin_unlock(lock)
576 #define OSTI_SPIN_LOCK(lock)
577 #define OSTI_SPIN_UNLOCK(lock)
582 ostiEnter(tiRoot_t *ptiRoot, U32 layer, int io)
584 ag_card_t *pCard = ((ag_card_info_t*)ptiRoot->osData)->pCard;
585 int ini = ((pCard->flags & AGTIAPI_INIT_TIME) == AGTIAPI_INIT_TIME);
587 BUG_ON((io != 0 && io != 1) || (layer != 0 && layer != 1 && layer != 2));
590 unsigned long long cycles = get_cycles();
592 OSTI_SPIN_LOCK(&pCard->latLock);
593 BUG_ON(pCard->callLevel[io] >= sizeof(pCard->layer[0]) /
594 sizeof(pCard->layer[0][0]));
595 if (pCard->callLevel[io] > 0)
597 unsigned int prev_layer = pCard->layer[io][pCard->callLevel[io] - 1];
599 pCard->totalCycles[io][prev_layer] += cycles -
600 pCard->enterCycles[io][prev_layer];
602 pCard->enterCycles[io][layer] = cycles;
603 pCard->layer[io][pCard->callLevel[io]] = layer;
604 pCard->callLevel[io]++;
605 OSTI_SPIN_UNLOCK(&pCard->latLock);
610 ostiLeave(tiRoot_t *ptiRoot, U32 layer, int io)
612 ag_card_t *pCard = ((ag_card_info_t*)ptiRoot->osData)->pCard;
613 int ini = ((pCard->flags & AGTIAPI_INIT_TIME) == AGTIAPI_INIT_TIME);
615 BUG_ON((io != 0 && io != 1) || (layer != 0 && layer != 1 && layer != 2));
618 unsigned long long cycles = get_cycles();
620 OSTI_SPIN_LOCK(&pCard->latLock);
621 pCard->callLevel[io]--;
623 BUG_ON(pCard->callLevel[io] < 0);
624 BUG_ON(pCard->layer[io][pCard->callLevel[io]] != layer);
626 pCard->totalCycles[io][layer] += cycles - pCard->enterCycles[io][layer];
627 if (pCard->callLevel[io] > 0)
628 pCard->enterCycles[io][pCard->layer[io][pCard->callLevel[io] - 1]] =
630 OSTI_SPIN_UNLOCK(&pCard->latLock);
637 osGLOBAL FORCEINLINE bit8
652 sbit32 volatile *Addend
662 sbit32 volatile *Addend
673 sbit32 volatile *Destination,
685 sbit32 volatile *Destination,
692 set_bit(Value, (volatile unsigned long *)Destination);
700 sbit32 volatile *Target,
709 osGLOBAL FORCEINLINE sbit32
710 ostiInterlockedExchange(
712 sbit32 volatile *Target,
719 osGLOBAL FORCEINLINE sbit32
720 ostiInterlockedIncrement(
722 sbit32 volatile *Addend
728 osGLOBAL FORCEINLINE sbit32
729 ostiInterlockedDecrement(
731 sbit32 volatile *Addend
737 osGLOBAL FORCEINLINE sbit32
740 sbit32 volatile *Destination,
747 osGLOBAL FORCEINLINE sbit32
750 sbit32 volatile *Destination,
757 // this is just stub code to allow compile and use of the module ...
758 // now that a call to this function has been added with windows specific
761 ostiSetDeviceQueueDepth( tiRoot_t *tiRoot,
762 tiIORequest_t *tiIORequest,
767 struct agtiapi_softc *pCard = TIROOT_TO_CARD(tiRoot);
768 ccb_t *pccb = (ccb_t *) tiIORequest->osData;
769 tiDeviceHandle_t *tiDeviceHandle = pccb->devHandle;
770 ag_device_t *pDevice = (ag_device_t *)tiDeviceHandle->osData;
771 AGTIAPI_PRINTK( "ostiSetDeviceQueueDepth stub only: root%p, req%p, qdeep%d\n",
772 tiRoot, tiIORequest, QueueDepth );
773 pDevice->qdepth = QueueDepth;
778 // this is just stub code to allow compile and use of the module ...
779 // now that a call to this function has been added with windows specific
782 ostiGetSenseKeyCount(tiRoot_t *root,
788 AGTIAPI_PRINTK( "ostiGetSenseKeyCount stub only: rt%p, fcl%d, kyCt%p, ln%d\n",
789 root, fIsClear, SenseKeyCount, length );
793 ostiGetSCSIStatusCount(tiRoot_t *root,
795 void *ScsiStatusCount,
799 AGTIAPI_PRINTK( "ostiGetSCSIStatusCount: stub only rt%p, fcl%d, kyCt%p, ln%d\n",
800 root, fIsClear, ScsiStatusCount, length );
804 osGLOBAL void ostiPCI_TRIGGER( tiRoot_t *tiRoot )
806 ostiChipReadBit32Ext(tiRoot, 0, 0x5C);
811 ostiNumOfLUNIOCTLreq( tiRoot_t *root,
814 void **tiRequestBody,
815 tiIORequest_t **tiIORequest
818 bit32 status = IOCTL_CALL_SUCCESS;
820 AGTIAPI_PRINTK("ostiNumOfLUNIOCTLreq: start\n");
821 struct agtiapi_softc *pCard = TIROOT_TO_CARD(root);
823 if ((pccb = agtiapi_GetCCB(pCard)) == NULL)
825 printf("ostiNumOfLUNIOCTLreq - GetCCB ERROR\n");
826 status = IOCTL_CALL_FAIL;
830 *tiIORequest = (tiIORequest_t*)&pccb->tiIORequest;
831 *tiRequestBody = &pccb->tdIOReqBody;
832 AGTIAPI_PRINTK("ostiNumOfLUNIOCTLreq:end\n");