Lines Matching refs:pSetup

171     PCVUSBSETUP     pSetup = NULL;
217 pSetup = (PVUSBSETUP)pUrb->abData;
218 pbData += sizeof(*pSetup);
219 cbData -= sizeof(*pSetup);
223 pSetup->bmRequestType, s_apszReqDirs[pSetup->bmRequestType >> 7], s_apszReqTypes[(pSetup->bmRequestType >> 5) & 0x3],
224 (unsigned)(pSetup->bmRequestType & 0xf) < RT_ELEMENTS(s_apszReqRecipients) ? s_apszReqRecipients[pSetup->bmRequestType & 0xf] : "??",
225 pSetup->bRequest, pSetup->bRequest < RT_ELEMENTS(s_apszRequests) ? s_apszRequests[pSetup->bRequest] : "??",
226 pSetup->wValue, pSetup->wIndex, pSetup->wLength));
228 if ( pSetup->bRequest == VUSB_REQ_GET_DESCRIPTOR
231 && ((pSetup->bmRequestType >> 5) & 0x3) < 2 /* vendor */)
242 pSetup = pPipe->pCtrl->pMsg;
243 if (pSetup->bRequest == VUSB_REQ_GET_DESCRIPTOR)
377 if (!pSetup->wIndex)
758 if ( pSetup
759 && ((pSetup->bmRequestType >> 5) & 0x3) >= 2 /* vendor */
760 && (fComplete || !(pSetup->bmRequestType >> 7))
770 pbData = (const uint8_t *)(pSetup + 1);
771 cbData = pUrb->cbData - sizeof(*pSetup);
773 if ( pSetup->bRequest == 0x04
774 && pSetup->wIndex == 0
783 switch (pSetup->wValue)
809 (pSetup->bmRequestType >> 7) ? "read" : "write", uVal, uVal, (pSetup->bmRequestType >> 7) ? "from" : "to",
810 pszReg, pSetup->wValue));
814 pSetup->bRequest, pSetup->bmRequestType, pSetup->wValue, pSetup->wIndex, cbData, pbData));
817 pSetup->bRequest, pSetup->bmRequestType, pSetup->wValue, pSetup->wIndex));
844 PVUSBSETUP pSetup = pExtra->pMsg;
847 pUrb->pszDesc, pUrb->cbData, pSetup->wLength, pExtra->cbLeft, pPipe, g_apszCtlStates[pExtra->enmStage])); NOREF(pSetup);
863 PVUSBSETUP pSetup = pExtra->pMsg;
866 pUrb->pszDesc, pUrb->cbData, pSetup->wLength, pExtra->cbLeft, pPipe)); NOREF(pSetup);
1158 DECLINLINE(bool) vusbUrbIsRequestSafe(PCVUSBSETUP pSetup, PVUSBURB pUrb)
1160 if ((pSetup->bmRequestType & VUSB_REQ_MASK) != VUSB_REQ_STANDARD)
1163 switch (pSetup->bRequest)
1167 || pSetup->wValue != 0 /* not ENDPOINT_HALT */
1183 || (pSetup->bmRequestType & VUSB_RECIP_MASK) != VUSB_TO_DEVICE)
1185 switch (pSetup->wValue >> 8)
1258 PVUSBSETUP pSetup = pExtra->pMsg;
1261 uint8_t *pbData = (uint8_t *)pExtra->pMsg + sizeof(*pSetup);
1262 uint32_t cbData = pSetup->wLength;
1265 fOk = vusbDevStandardRequest(pDev, pUrb->EndPt, pSetup, pbData, &cbData);
1272 pSetup->wLength = cbData;
1489 PVUSBSETUP pSetup = pExtra->pMsg;
1492 pExtra->pbCur = (uint8_t *)(pSetup + 1);
1493 pSetup->bmRequestType = pSetupIn->bmRequestType;
1494 pSetup->bRequest = pSetupIn->bRequest;
1495 pSetup->wValue = RT_LE2H_U16(pSetupIn->wValue);
1496 pSetup->wIndex = RT_LE2H_U16(pSetupIn->wIndex);
1497 pSetup->wLength = RT_LE2H_U16(pSetupIn->wLength);
1500 pPipe, cbBuf, pSetup->bmRequestType, pSetup->bRequest, pSetup->wValue, pSetup->wIndex, pSetup->wLength));
1510 static void vusbMsgDoTransfer(PVUSBURB pUrb, PVUSBSETUP pSetup, PVUSBCTRLEXTRA pExtra, PVUSBPIPE pPipe, PVUSBDEV pDev)
1521 bool fSafeRequest = vusbUrbIsRequestSafe(pSetup, pUrb);
1535 pExtra->Urb.enmDir = (pSetup->bmRequestType & VUSB_DIR_TO_HOST) ? VUSBDIRECTION_IN : VUSBDIRECTION_OUT;
1536 pExtra->Urb.cbData = pSetup->wLength + sizeof(*pSetup);
1606 PVUSBSETUP pSetup = pExtra->pMsg;
1628 && !!(pSetup->bmRequestType & VUSB_DIR_TO_HOST) != (pUrb->enmDir == VUSBDIRECTION_IN))
1663 pSetup = pExtra->pMsg;
1667 if (pSetup->bmRequestType & VUSB_DIR_TO_HOST)
1668 vusbMsgDoTransfer(pUrb, pSetup, pExtra, pPipe, pDev);
1669 else if (pSetup->wLength)
1683 vusbMsgDoTransfer(pUrb, pSetup, pExtra, pPipe, pDev);
1695 if (&pExtra->pbCur[pUrb->cbData] > &pbData[pSetup->wLength])
1697 if (!pSetup->wLength) /* happens during iPhone detection with iTunes (correct?) */
1699 Log(("%s: vusbUrbSubmitCtrl: pSetup->wLength == 0!! (iPhone)\n", pUrb->pszDesc));
1700 pSetup->wLength = pUrb->cbData;
1704 if ( (pSetup->bmRequestType & VUSB_DIR_TO_HOST)
1705 || pSetup->wLength == 0
1706 || (pUrb->cbData % pSetup->wLength) == 0) /* magic which need explaining... */
1708 uint8_t *pbEnd = pbData + pSetup->wLength;
1753 && pExtra->pbCur - pbData >= pSetup->wLength)
1756 vusbMsgDoTransfer(pUrb, pSetup, pExtra, pPipe, pDev);
1768 if ( (pSetup->bmRequestType & VUSB_DIR_TO_HOST)
1779 vusbMsgDoTransfer(pUrb, pSetup, pExtra, pPipe, pDev);