Lines Matching defs:pDevice
2280 ag_device_t *pDevice = NULL;
2346 pDevice = &pCard->pDevList[INDEX(pCard, pTMccb->targetId)];
2347 if ((pDevice == NULL) || !(pDevice->flags & ACTIVE))
3907 ag_device_t *pDevice;
3926 pDevice = NULL;
3934 pDevice = &pmcsc->pDevList[TID];
3935 if (pDevice != NULL)
3944 AGTIAPI_PRINTK("agtiapi_CheckError: pDevice == NULL\n");
3952 if(pDevice->CCBCount > 0){
3953 atomic_subtract_int(&pDevice->CCBCount,1);
4097 agtiapi_HandleEncryptedIOFailure(pDevice, pccb);
4104 agtiapi_HandleEncryptedIOFailure(pDevice, pccb);
5270 ag_device_t *pDevice;
5359 pDevice = &lTmpDevice;
5360 pDevice->devType = DIRECT_DEVICE;
5361 pDevice->pCard = (void *)pCard;
5362 pDevice->flags = ACTIVE;
5363 pDevice->pPortalInfo = pPortalInfo;
5364 pDevice->pDevHandle = agDev[devIdx];
5365 pDevice->qbusy = agFALSE;
5371 &pDevice->devInfo );
5374 // sizeof(pDevice->targetName),
5375 // pDevice->devInfo.osAddress1,
5376 // pDevice->devInfo.osAddress2 );
5378 wwncpy( pDevice );
5379 wwnprintk( (unsigned char*)pDevice->targetName, pDevice->targetLen );
5384 pDevice->targetLen > 0 &&
5393 memcmp( pWWNList[lDevIndex].targetName, pDevice->targetName,
5394 pDevice->targetLen ) == 0 &&
5413 lDevFlags[lDevIndex] |= DPMC_LEANFLAG_PDEVSUSED; // pDevice used
5434 // pDevice going fresh
5438 pDevice->targetId = lDevIndex;
5439 pDevice->portalId = pPortalInfo->portID;
5441 memcpy ( &pCard->pDevList[lDevIndex], pDevice, sizeof(lTmpDevice) );
5443 if ( agtiapi_InitCCBs( pCard, 1, pDevice->targetId ) == 0 )
5457 lDevFlags[lDevIndex] |= DPMC_LEANFLAG_PDEVSUSED; // pDevice used
5466 lDevFlags[lDevIndex] |= DPMC_LEANFLAG_PDEVSUSED; // pDevice used
5478 // later, get an empty pDevice and map this agDev.
5526 pDevice = &pCard->pDevList[lDevIndex];
5528 tiINIGetDeviceInfo( &pCard->tiRoot, agDev[devIdx], &pDevice->devInfo );
5529 wwncpy( pDevice );
5532 pDevice->pCard = (void *)pCard;
5533 pDevice->devType = DIRECT_DEVICE;
5536 memcpy( pWWNList[lDevIndex].targetName, pDevice->targetName, pDevice->targetLen );
5537 pWWNList[lDevIndex].targetLen = pDevice->targetLen;
5550 pDevice->targetId = lDevIndex;
5552 pDevice->flags = ACTIVE;
5553 pDevice->CCBCount = 0;
5554 pDevice->pDevHandle = agDev[devIdx];
5555 agDev[devIdx]->osData = (void*)pDevice;
5557 pDevice->pPortalInfo = pPortalInfo;
5558 pDevice->portalId = pPortalInfo->portID;
5559 pPortalInfo->pDevList[lDevIndex] = (void*)pDevice;
5560 lDevFlags[lDevIndex] |= DPMC_LEANFLAG_PDEVSUSED; // mark pDevice slot used
5564 !(lDevFlags[devIdx] & DPMC_LEANFLAG_PDEVSUSED) ) // pDevice not used
5566 pDevice = &pCard->pDevList[devIdx];
5567 //pDevice->flags &= ~ACTIVE;
5568 if ( ( pDevice->pDevHandle != NULL ||
5735 STATIC int wwncpy( ag_device_t *pDevice )
5739 if (sizeof(pDevice->targetName) >= pDevice->devInfo.osAddress1 +
5740 pDevice->devInfo.osAddress2)
5742 memcpy(pDevice->targetName,
5743 pDevice->devInfo.remoteName,
5744 pDevice->devInfo.osAddress1);
5745 memcpy(pDevice->targetName + pDevice->devInfo.osAddress1,
5746 pDevice->devInfo.remoteAddress,
5747 pDevice->devInfo.osAddress2);
5748 pDevice->targetLen = pDevice->devInfo.osAddress1 +
5749 pDevice->devInfo.osAddress2;
5750 rc = pDevice->targetLen;
5755 pDevice->devInfo.osAddress1, pDevice->devInfo.osAddress2);
6034 ag_device_t *pDevice;
6117 pDevice = pCard->pDevList;
6118 for( lIdx = 0; lIdx < maxTargets; lIdx++, pDevice++ )
6120 /* if ( pDevice->flags & ACTIVE )
6124 pDevice->flags &= ~ACTIVE;
6169 pDevice = (ag_device_t*)pPortalInfo->pDevList[lIdx];
6170 if( pDevice )
6173 pDevice->pDevHandle = 0; // mark for availability in pCard->pDevList[]
6177 pDevice, pPortalInfo->pDevList, lIdx );