Lines Matching defs:pNew
440 PUSBPROXYISOCBUFCOL pNew = (PUSBPROXYISOCBUFCOL)RTMemAllocZ(sizeof(*pNew));
441 AssertReturn(pNew, VERR_NO_MEMORY);
443 IOReturn irc = (*pIf->ppIfI)->LowLatencyCreateBuffer(pIf->ppIfI, &pNew->pvBuffer, 8192 * RT_ELEMENTS(pNew->aBuffers), enmLLType);
444 if (irc == kIOReturnSuccess != VALID_PTR(pNew->pvBuffer))
446 AssertPtr(pNew->pvBuffer);
451 irc = (*pIf->ppIfI)->LowLatencyCreateBuffer(pIf->ppIfI, &pNew->pvFrames, PAGE_SIZE, kUSBLowLatencyFrameListBuffer);
452 if (irc == kIOReturnSuccess != VALID_PTR(pNew->pvFrames))
454 AssertPtr(pNew->pvFrames);
459 for (unsigned i = 0; i < RT_ELEMENTS(pNew->aBuffers); i++)
461 //pNew->aBuffers[i].fUsed = false;
462 pNew->aBuffers[i].paFrames = &((IOUSBLowLatencyIsocFrame *)pNew->pvFrames)[i * 8];
463 pNew->aBuffers[i].pvBuf = (uint8_t *)pNew->pvBuffer + i * 8192;
466 pNew->aBuffers[0].fUsed = true;
467 pUrbOsX->u.Isoc.aFrames = pNew->aBuffers[0].paFrames;
468 pUrbOsX->u.Isoc.pBuf = &pNew->aBuffers[0];
470 pNew->enmType = enmLLType;
471 pNew->pNext = pIf->pIsocBufCols;
472 pIf->pIsocBufCols = pNew;
478 if (!pNew->pNext)
492 (*pIf->ppIfI)->LowLatencyDestroyBuffer(pIf->ppIfI, pNew->pvBuffer);
495 RTMemFree(pNew);