Lines Matching refs:pCard
57 struct agtiapi_softc *pCard = TIROOT_TO_CARD( ptiRoot ); in ostiInitiatorEvent() local
85 pCard->flags |= AGTIAPI_CB_DONE; in ostiInitiatorEvent()
89 AGTIAPI_PRINTK("ostiInitiatorEvent: pcard %d eventStatus - tiDiscOK\n", pCard->cardNo ); in ostiInitiatorEvent()
92 if (!(pCard->flags & AGTIAPI_INIT_TIME)) in ostiInitiatorEvent()
98 agtiapi_GetDevHandle(pCard, &pPortalData->portalInfo, in ostiInitiatorEvent()
104 callout_reset(&pCard->IO_timer, 20*hz, agtiapi_CheckIOTimeout, pCard); in ostiInitiatorEvent()
109 agtiapi_GetDevHandle(pCard, &pPortalData->portalInfo, in ostiInitiatorEvent()
123 if (!(pCard->flags & AGTIAPI_INIT_TIME)) in ostiInitiatorEvent()
128 agtiapi_GetDevHandle(pCard, pPortalInfo, tiIntrEventTypeDeviceChange, in ostiInitiatorEvent()
142 agtiapi_FreeTMCCB(pCard, pccb); in ostiInitiatorEvent()
163 else if (tiINIIOAbort(&pCard->tiRoot, &ccbIO->tiIORequest) != tiSuccess) in ostiInitiatorEvent()
187 agtiapi_FreeTMCCB(pCard, pccb); in ostiInitiatorEvent()
202 if ((pTMccb = agtiapi_GetCCB(pCard)) == NULL) in ostiInitiatorEvent()
207 pTMccb->pmcsc = pCard; in ostiInitiatorEvent()
215 if (tiINITaskManagement(&pCard->tiRoot, in ostiInitiatorEvent()
231 agtiapi_FreeTMCCB(pCard, pTMccb); in ostiInitiatorEvent()
235 agtiapi_FreeTMCCB(pCard, pccb); in ostiInitiatorEvent()
276 struct agtiapi_softc *pCard; in ostiInitiatorIOCompleted() local
279 pCard = TIROOT_TO_CARD(ptiRoot); in ostiInitiatorIOCompleted()
330 agtiapi_Done(pCard, pccb); in ostiInitiatorIOCompleted()
342 pCard->flags |= AGTIAPI_FLAG_UP; in ostiInitiatorIOCompleted()
345 agtiapi_QueueCCB(pCard, &pCard->ccbDoneHead, &pCard->ccbDoneTail in ostiInitiatorIOCompleted()
346 AG_CARD_LOCAL_LOCK(&pCard->doneLock), pccb); in ostiInitiatorIOCompleted()
355 struct agtiapi_softc *pCard; in ostidisableEncryption() local
356 pCard = TIROOT_TO_CARD(ptiRoot); in ostidisableEncryption()
357 pCard->encrypt=agFALSE; in ostidisableEncryption()
373 struct agtiapi_softc *pCard = TIROOT_TO_CARD(root); in ostiGetDevHandleFromSasAddr() local
388 for (x=0; x < pCard->portCount; x++) in ostiGetDevHandleFromSasAddr()
390 pPortal = &pCard->pPortalData[x]; in ostiGetDevHandleFromSasAddr()
391 devHandle = tiINIGetExpDeviceHandleBySasAddress(&pCard->tiRoot, in ostiGetDevHandleFromSasAddr()
426 struct agtiapi_softc *pCard; in ostiInitiatorSMPCompleted() local
428 pCard = TIROOT_TO_CARD(ptiRoot); in ostiInitiatorSMPCompleted()
448 agtiapi_QueueCCB(pCard, &pCard->smpDoneHead, &pCard->smpDoneTail in ostiInitiatorSMPCompleted()
449 AG_CARD_LOCAL_LOCK(&pCard->doneSMPLock), pccb); in ostiInitiatorSMPCompleted()
464 ag_card_t *pCard; in osti_FastIOCb() local
490 pCard = TIROOT_TO_CARD(ptiRoot); in osti_FastIOCb()
492 agtiapi_QueueCCB(pCard, &pCard->ccbDoneHead, &pCard->ccbDoneTail in osti_FastIOCb()
493 AG_CARD_LOCAL_LOCK(&pCard->doneLock), pccb); in osti_FastIOCb()
515 struct agtiapi_softc *pCard = TIROOT_TO_CARD(ptiRoot); in ostiSingleThreadedEnter() local
516 mtx_lock( &pCard->STLock[queueId] ); // review: need irq save? ## in ostiSingleThreadedEnter()
535 struct agtiapi_softc *pCard = TIROOT_TO_CARD(ptiRoot); in ostiSingleThreadedLeave() local
536 mtx_unlock( &pCard->STLock[queueId] ); // review: need irq restore? ## in ostiSingleThreadedLeave()
548 struct agtiapi_softc *pCard; in ostiMapToDevHandle() local
551 pCard = TIROOT_TO_CARD(root); in ostiMapToDevHandle()
553 offset = pathId * pCard->tgtCount + targetId; in ostiMapToDevHandle()
555 if (offset > (pCard->tgtCount - 1) ) in ostiMapToDevHandle()
561 dev = pCard->pDevList[offset].pDevHandle; in ostiMapToDevHandle()
583 ag_card_t *pCard = ((ag_card_info_t*)ptiRoot->osData)->pCard; in ostiEnter() local
584 int ini = ((pCard->flags & AGTIAPI_INIT_TIME) == AGTIAPI_INIT_TIME); in ostiEnter()
591 OSTI_SPIN_LOCK(&pCard->latLock); in ostiEnter()
592 BUG_ON(pCard->callLevel[io] >= sizeof(pCard->layer[0]) / in ostiEnter()
593 sizeof(pCard->layer[0][0])); in ostiEnter()
594 if (pCard->callLevel[io] > 0) in ostiEnter()
596 unsigned int prev_layer = pCard->layer[io][pCard->callLevel[io] - 1]; in ostiEnter()
598 pCard->totalCycles[io][prev_layer] += cycles - in ostiEnter()
599 pCard->enterCycles[io][prev_layer]; in ostiEnter()
601 pCard->enterCycles[io][layer] = cycles; in ostiEnter()
602 pCard->layer[io][pCard->callLevel[io]] = layer; in ostiEnter()
603 pCard->callLevel[io]++; in ostiEnter()
604 OSTI_SPIN_UNLOCK(&pCard->latLock); in ostiEnter()
611 ag_card_t *pCard = ((ag_card_info_t*)ptiRoot->osData)->pCard; in ostiLeave() local
612 int ini = ((pCard->flags & AGTIAPI_INIT_TIME) == AGTIAPI_INIT_TIME); in ostiLeave()
619 OSTI_SPIN_LOCK(&pCard->latLock); in ostiLeave()
620 pCard->callLevel[io]--; in ostiLeave()
622 BUG_ON(pCard->callLevel[io] < 0); in ostiLeave()
623 BUG_ON(pCard->layer[io][pCard->callLevel[io]] != layer); in ostiLeave()
625 pCard->totalCycles[io][layer] += cycles - pCard->enterCycles[io][layer]; in ostiLeave()
626 if (pCard->callLevel[io] > 0) in ostiLeave()
627 pCard->enterCycles[io][pCard->layer[io][pCard->callLevel[io] - 1]] = in ostiLeave()
629 OSTI_SPIN_UNLOCK(&pCard->latLock); in ostiLeave()
819 struct agtiapi_softc *pCard = TIROOT_TO_CARD(root); in ostiNumOfLUNIOCTLreq() local
821 if ((pccb = agtiapi_GetCCB(pCard)) == NULL) in ostiNumOfLUNIOCTLreq()