Lines Matching refs:pDevice
2308 ag_device_t *pDevice = NULL; in agtiapi_StartTM() local
2374 pDevice = &pCard->pDevList[INDEX(pCard, pTMccb->targetId)]; in agtiapi_StartTM()
2375 if ((pDevice == NULL) || !(pDevice->flags & ACTIVE)) in agtiapi_StartTM()
3933 ag_device_t *pDevice; in agtiapi_CheckError() local
3952 pDevice = NULL; in agtiapi_CheckError()
3960 pDevice = &pmcsc->pDevList[TID]; in agtiapi_CheckError()
3961 if (pDevice != NULL) in agtiapi_CheckError()
3978 if(pDevice->CCBCount > 0){ in agtiapi_CheckError()
3979 atomic_subtract_int(&pDevice->CCBCount,1); in agtiapi_CheckError()
4123 agtiapi_HandleEncryptedIOFailure(pDevice, pccb); in agtiapi_CheckError()
4130 agtiapi_HandleEncryptedIOFailure(pDevice, pccb); in agtiapi_CheckError()
5296 ag_device_t *pDevice; in agtiapi_GetDevHandle() local
5385 pDevice = &lTmpDevice; in agtiapi_GetDevHandle()
5386 pDevice->devType = DIRECT_DEVICE; in agtiapi_GetDevHandle()
5387 pDevice->pCard = (void *)pCard; in agtiapi_GetDevHandle()
5388 pDevice->flags = ACTIVE; in agtiapi_GetDevHandle()
5389 pDevice->pPortalInfo = pPortalInfo; in agtiapi_GetDevHandle()
5390 pDevice->pDevHandle = agDev[devIdx]; in agtiapi_GetDevHandle()
5391 pDevice->qbusy = agFALSE; in agtiapi_GetDevHandle()
5397 &pDevice->devInfo ); in agtiapi_GetDevHandle()
5404 wwncpy( pDevice ); in agtiapi_GetDevHandle()
5405 wwnprintk( (unsigned char*)pDevice->targetName, pDevice->targetLen ); in agtiapi_GetDevHandle()
5410 pDevice->targetLen > 0 && in agtiapi_GetDevHandle()
5419 memcmp( pWWNList[lDevIndex].targetName, pDevice->targetName, in agtiapi_GetDevHandle()
5420 pDevice->targetLen ) == 0 && in agtiapi_GetDevHandle()
5464 pDevice->targetId = lDevIndex; in agtiapi_GetDevHandle()
5465 pDevice->portalId = pPortalInfo->portID; in agtiapi_GetDevHandle()
5467 memcpy ( &pCard->pDevList[lDevIndex], pDevice, sizeof(lTmpDevice) ); in agtiapi_GetDevHandle()
5469 if ( agtiapi_InitCCBs( pCard, 1, pDevice->targetId ) == 0 ) in agtiapi_GetDevHandle()
5552 pDevice = &pCard->pDevList[lDevIndex]; in agtiapi_GetDevHandle()
5554 tiINIGetDeviceInfo( &pCard->tiRoot, agDev[devIdx], &pDevice->devInfo ); in agtiapi_GetDevHandle()
5555 wwncpy( pDevice ); in agtiapi_GetDevHandle()
5558 pDevice->pCard = (void *)pCard; in agtiapi_GetDevHandle()
5559 pDevice->devType = DIRECT_DEVICE; in agtiapi_GetDevHandle()
5562 memcpy( pWWNList[lDevIndex].targetName, pDevice->targetName, pDevice->targetLen ); in agtiapi_GetDevHandle()
5563 pWWNList[lDevIndex].targetLen = pDevice->targetLen; in agtiapi_GetDevHandle()
5576 pDevice->targetId = lDevIndex; in agtiapi_GetDevHandle()
5578 pDevice->flags = ACTIVE; in agtiapi_GetDevHandle()
5579 pDevice->CCBCount = 0; in agtiapi_GetDevHandle()
5580 pDevice->pDevHandle = agDev[devIdx]; in agtiapi_GetDevHandle()
5581 agDev[devIdx]->osData = (void*)pDevice; in agtiapi_GetDevHandle()
5583 pDevice->pPortalInfo = pPortalInfo; in agtiapi_GetDevHandle()
5584 pDevice->portalId = pPortalInfo->portID; in agtiapi_GetDevHandle()
5585 pPortalInfo->pDevList[lDevIndex] = (void*)pDevice; in agtiapi_GetDevHandle()
5592 pDevice = &pCard->pDevList[devIdx]; in agtiapi_GetDevHandle()
5594 if ( ( pDevice->pDevHandle != NULL || in agtiapi_GetDevHandle()
5761 STATIC int wwncpy( ag_device_t *pDevice ) in wwncpy() argument
5765 if (sizeof(pDevice->targetName) >= pDevice->devInfo.osAddress1 + in wwncpy()
5766 pDevice->devInfo.osAddress2) in wwncpy()
5768 memcpy(pDevice->targetName, in wwncpy()
5769 pDevice->devInfo.remoteName, in wwncpy()
5770 pDevice->devInfo.osAddress1); in wwncpy()
5771 memcpy(pDevice->targetName + pDevice->devInfo.osAddress1, in wwncpy()
5772 pDevice->devInfo.remoteAddress, in wwncpy()
5773 pDevice->devInfo.osAddress2); in wwncpy()
5774 pDevice->targetLen = pDevice->devInfo.osAddress1 + in wwncpy()
5775 pDevice->devInfo.osAddress2; in wwncpy()
5776 rc = pDevice->targetLen; in wwncpy()
5781 pDevice->devInfo.osAddress1, pDevice->devInfo.osAddress2); in wwncpy()
6060 ag_device_t *pDevice; in agtiapi_ResetCard() local
6143 pDevice = pCard->pDevList; in agtiapi_ResetCard()
6144 for( lIdx = 0; lIdx < maxTargets; lIdx++, pDevice++ ) in agtiapi_ResetCard()
6150 pDevice->flags &= ~ACTIVE; in agtiapi_ResetCard()
6195 pDevice = (ag_device_t*)pPortalInfo->pDevList[lIdx]; in agtiapi_ResetCard()
6196 if( pDevice ) in agtiapi_ResetCard()
6199 pDevice->pDevHandle = 0; // mark for availability in pCard->pDevList[] in agtiapi_ResetCard()
6203 pDevice, pPortalInfo->pDevList, lIdx ); in agtiapi_ResetCard()