Lines Matching refs:pCard

58   struct agtiapi_softc *pCard = TIROOT_TO_CARD( ptiRoot );  in ostiInitiatorEvent()  local
86 pCard->flags |= AGTIAPI_CB_DONE; in ostiInitiatorEvent()
90 AGTIAPI_PRINTK("ostiInitiatorEvent: pcard %d eventStatus - tiDiscOK\n", pCard->cardNo ); in ostiInitiatorEvent()
93 if (!(pCard->flags & AGTIAPI_INIT_TIME)) in ostiInitiatorEvent()
99 agtiapi_GetDevHandle(pCard, &pPortalData->portalInfo, in ostiInitiatorEvent()
105 callout_reset(&pCard->IO_timer, 20*hz, agtiapi_CheckIOTimeout, pCard); in ostiInitiatorEvent()
110 agtiapi_GetDevHandle(pCard, &pPortalData->portalInfo, in ostiInitiatorEvent()
124 if (!(pCard->flags & AGTIAPI_INIT_TIME)) in ostiInitiatorEvent()
129 agtiapi_GetDevHandle(pCard, pPortalInfo, tiIntrEventTypeDeviceChange, in ostiInitiatorEvent()
143 agtiapi_FreeTMCCB(pCard, pccb); in ostiInitiatorEvent()
164 else if (tiINIIOAbort(&pCard->tiRoot, &ccbIO->tiIORequest) != tiSuccess) in ostiInitiatorEvent()
188 agtiapi_FreeTMCCB(pCard, pccb); in ostiInitiatorEvent()
203 if ((pTMccb = agtiapi_GetCCB(pCard)) == NULL) in ostiInitiatorEvent()
208 pTMccb->pmcsc = pCard; in ostiInitiatorEvent()
216 if (tiINITaskManagement(&pCard->tiRoot, in ostiInitiatorEvent()
232 agtiapi_FreeTMCCB(pCard, pTMccb); in ostiInitiatorEvent()
236 agtiapi_FreeTMCCB(pCard, pccb); in ostiInitiatorEvent()
277 struct agtiapi_softc *pCard; in ostiInitiatorIOCompleted() local
280 pCard = TIROOT_TO_CARD(ptiRoot); in ostiInitiatorIOCompleted()
331 agtiapi_Done(pCard, pccb); in ostiInitiatorIOCompleted()
343 pCard->flags |= AGTIAPI_FLAG_UP; in ostiInitiatorIOCompleted()
346 agtiapi_QueueCCB(pCard, &pCard->ccbDoneHead, &pCard->ccbDoneTail in ostiInitiatorIOCompleted()
347 AG_CARD_LOCAL_LOCK(&pCard->doneLock), pccb); in ostiInitiatorIOCompleted()
356 struct agtiapi_softc *pCard; in ostidisableEncryption() local
357 pCard = TIROOT_TO_CARD(ptiRoot); in ostidisableEncryption()
358 pCard->encrypt=agFALSE; in ostidisableEncryption()
374 struct agtiapi_softc *pCard = TIROOT_TO_CARD(root); in ostiGetDevHandleFromSasAddr() local
389 for (x=0; x < pCard->portCount; x++) in ostiGetDevHandleFromSasAddr()
391 pPortal = &pCard->pPortalData[x]; in ostiGetDevHandleFromSasAddr()
392 devHandle = tiINIGetExpDeviceHandleBySasAddress(&pCard->tiRoot, in ostiGetDevHandleFromSasAddr()
427 struct agtiapi_softc *pCard; in ostiInitiatorSMPCompleted() local
429 pCard = TIROOT_TO_CARD(ptiRoot); in ostiInitiatorSMPCompleted()
449 agtiapi_QueueCCB(pCard, &pCard->smpDoneHead, &pCard->smpDoneTail in ostiInitiatorSMPCompleted()
450 AG_CARD_LOCAL_LOCK(&pCard->doneSMPLock), pccb); in ostiInitiatorSMPCompleted()
465 ag_card_t *pCard; in osti_FastIOCb() local
491 pCard = TIROOT_TO_CARD(ptiRoot); in osti_FastIOCb()
493 agtiapi_QueueCCB(pCard, &pCard->ccbDoneHead, &pCard->ccbDoneTail in osti_FastIOCb()
494 AG_CARD_LOCAL_LOCK(&pCard->doneLock), pccb); in osti_FastIOCb()
516 struct agtiapi_softc *pCard = TIROOT_TO_CARD(ptiRoot); in ostiSingleThreadedEnter() local
517 mtx_lock( &pCard->STLock[queueId] ); // review: need irq save? ## in ostiSingleThreadedEnter()
536 struct agtiapi_softc *pCard = TIROOT_TO_CARD(ptiRoot); in ostiSingleThreadedLeave() local
537 mtx_unlock( &pCard->STLock[queueId] ); // review: need irq restore? ## in ostiSingleThreadedLeave()
549 struct agtiapi_softc *pCard; in ostiMapToDevHandle() local
552 pCard = TIROOT_TO_CARD(root); in ostiMapToDevHandle()
554 offset = pathId * pCard->tgtCount + targetId; in ostiMapToDevHandle()
556 if (offset > (pCard->tgtCount - 1) ) in ostiMapToDevHandle()
562 dev = pCard->pDevList[offset].pDevHandle; in ostiMapToDevHandle()
584 ag_card_t *pCard = ((ag_card_info_t*)ptiRoot->osData)->pCard; in ostiEnter() local
585 int ini = ((pCard->flags & AGTIAPI_INIT_TIME) == AGTIAPI_INIT_TIME); in ostiEnter()
592 OSTI_SPIN_LOCK(&pCard->latLock); in ostiEnter()
593 BUG_ON(pCard->callLevel[io] >= sizeof(pCard->layer[0]) / in ostiEnter()
594 sizeof(pCard->layer[0][0])); in ostiEnter()
595 if (pCard->callLevel[io] > 0) in ostiEnter()
597 unsigned int prev_layer = pCard->layer[io][pCard->callLevel[io] - 1]; in ostiEnter()
599 pCard->totalCycles[io][prev_layer] += cycles - in ostiEnter()
600 pCard->enterCycles[io][prev_layer]; in ostiEnter()
602 pCard->enterCycles[io][layer] = cycles; in ostiEnter()
603 pCard->layer[io][pCard->callLevel[io]] = layer; in ostiEnter()
604 pCard->callLevel[io]++; in ostiEnter()
605 OSTI_SPIN_UNLOCK(&pCard->latLock); in ostiEnter()
612 ag_card_t *pCard = ((ag_card_info_t*)ptiRoot->osData)->pCard; in ostiLeave() local
613 int ini = ((pCard->flags & AGTIAPI_INIT_TIME) == AGTIAPI_INIT_TIME); in ostiLeave()
620 OSTI_SPIN_LOCK(&pCard->latLock); in ostiLeave()
621 pCard->callLevel[io]--; in ostiLeave()
623 BUG_ON(pCard->callLevel[io] < 0); in ostiLeave()
624 BUG_ON(pCard->layer[io][pCard->callLevel[io]] != layer); in ostiLeave()
626 pCard->totalCycles[io][layer] += cycles - pCard->enterCycles[io][layer]; in ostiLeave()
627 if (pCard->callLevel[io] > 0) in ostiLeave()
628 pCard->enterCycles[io][pCard->layer[io][pCard->callLevel[io] - 1]] = in ostiLeave()
630 OSTI_SPIN_UNLOCK(&pCard->latLock); in ostiLeave()
820 struct agtiapi_softc *pCard = TIROOT_TO_CARD(root); in ostiNumOfLUNIOCTLreq() local
822 if ((pccb = agtiapi_GetCCB(pCard)) == NULL) in ostiNumOfLUNIOCTLreq()