Changeset 62958 in vbox
- Timestamp:
- Aug 4, 2016 7:54:03 AM (8 years ago)
- Location:
- trunk/src/VBox/Devices/USB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/DrvVUSBRootHub.cpp
r62956 r62958 287 287 static DECLCALLBACK(int) vusbPDMHubDetachDevice(PPDMDRVINS pDrvIns, PPDMUSBINS pUsbIns, uint32_t iPort) 288 288 { 289 RT_NOREF(pDrvIns, iPort); 289 290 PVUSBDEV pDev = (PVUSBDEV)pUsbIns->pvVUsbDev2; 290 291 Assert(pDev); … … 392 393 VUSBDIRECTION enmDir, uint32_t cbData, uint32_t cTds, const char *pszTag) 393 394 { 395 RT_NOREF(pszTag); 394 396 PVUSBURBPOOL pUrbPool = &pRh->Hub.Dev.UrbPool; 395 397 … … 564 566 static DECLCALLBACK(int) vusbRhR3PeriodFrameWorker(PPDMDRVINS pDrvIns, PPDMTHREAD pThread) 565 567 { 568 RT_NOREF(pDrvIns); 566 569 int rc = VINF_SUCCESS; 567 570 PVUSBROOTHUB pThis = (PVUSBROOTHUB)pThread->pvUser; … … 619 622 static DECLCALLBACK(int) vusbRhR3PeriodFrameWorkerWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread) 620 623 { 624 RT_NOREF(pThread); 621 625 PVUSBROOTHUB pThis = PDMINS_2_DATA(pDrvIns, PVUSBROOTHUB); 622 626 return RTSemEventMultiSignal(pThis->hSemEventPeriodFrame); … … 648 652 static DECLCALLBACK(int) vusbRhConnFreeUrb(PVUSBIROOTHUBCONNECTOR pInterface, PVUSBURB pUrb) 649 653 { 650 PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface); 651 654 RT_NOREF(pInterface); 652 655 pUrb->pVUsb->pfnFree(pUrb); 653 656 return VINF_SUCCESS; … … 768 771 static DECLCALLBACK(void) vusbRhReapAsyncUrbs(PVUSBIROOTHUBCONNECTOR pInterface, PVUSBIDEVICE pDevice, RTMSINTERVAL cMillies) 769 772 { 770 PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface); 773 PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface); NOREF(pRh); 771 774 PVUSBDEV pDev = (PVUSBDEV)pDevice; 772 775 … … 994 997 * @interface_method_impl{VUSBIDEVICE,pfnReset} 995 998 */ 996 static DECLCALLBACK(int) vusbRhDevReset(PVUSBIDEVICE pInterface, bool fResetOnLinux, PFNVUSBRESETDONE pfnDone, void *pvUser, PVM pVM) 997 { 999 static DECLCALLBACK(int) vusbRhDevReset(PVUSBIDEVICE pInterface, bool fResetOnLinux, 1000 PFNVUSBRESETDONE pfnDone, void *pvUser, PVM pVM) 1001 { 1002 RT_NOREF(pfnDone, pvUser, pVM); 998 1003 PVUSBROOTHUB pRh = RT_FROM_MEMBER(pInterface, VUSBROOTHUB, Hub.Dev.IDevice); 999 1004 Assert(!pfnDone); … … 1223 1228 static DECLCALLBACK(int) vusbRhConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 1224 1229 { 1230 RT_NOREF(fFlags); 1231 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 1225 1232 LogFlow(("vusbRhConstruct: Instance %d\n", pDrvIns->iInstance)); 1226 1233 PVUSBROOTHUB pThis = PDMINS_2_DATA(pDrvIns, PVUSBROOTHUB); 1227 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);1228 1234 1229 1235 /* -
trunk/src/VBox/Devices/USB/VUSBBufferedPipe.cpp
r62463 r62958 284 284 static int vusbBufferedPipeSetParamsFromDescriptor(PVUSBBUFFEREDPIPEINT pThis, PCVUSBDESCENDPOINT pDesc) 285 285 { 286 int rc = VINF_SUCCESS; 287 unsigned cbPktMax, uInterval, uMult; 286 unsigned cbPktMax; 287 unsigned uInterval; 288 unsigned uMult; 288 289 289 290 if (pThis->enmSpeed == VUSB_SPEED_HIGH) … … 308 309 /** @todo: Implement for super speed and up if it turns out to be required, at the moment it looks 309 310 * like we don't need it. */ 310 rc = VERR_NOT_SUPPORTED; 311 } 312 313 if (RT_SUCCESS(rc)) 314 { 315 pThis->uInterval = uInterval; 316 pThis->cbPktSize = cbPktMax * uMult; 317 pThis->uEndPt = pDesc->bEndpointAddress & 0xf; 318 319 unsigned cPackets = pThis->cLatencyMs / pThis->uInterval; 320 cPackets = RT_MAX(cPackets, 1); /* At least one packet. */ 321 pThis->cbRingBufData = pThis->cbPktSize * cPackets; 322 pThis->cIsocDesc = cPackets / 8 + ((cPackets % 8) ? 1 : 0); 323 } 324 325 return rc; 311 return VERR_NOT_SUPPORTED; 312 } 313 314 pThis->uInterval = uInterval; 315 pThis->cbPktSize = cbPktMax * uMult; 316 pThis->uEndPt = pDesc->bEndpointAddress & 0xf; 317 318 unsigned cPackets = pThis->cLatencyMs / pThis->uInterval; 319 cPackets = RT_MAX(cPackets, 1); /* At least one packet. */ 320 pThis->cbRingBufData = pThis->cbPktSize * cPackets; 321 pThis->cIsocDesc = cPackets / 8 + ((cPackets % 8) ? 1 : 0); 322 323 return VINF_SUCCESS; 326 324 } 327 325 … … 410 408 { 411 409 pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].enmStatus = VUSBSTATUS_NOT_ACCESSED; 412 pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].off = pIsocDesc->cbTotal; 410 pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].off = (uint16_t)pIsocDesc->cbTotal; 411 Assert(pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].off == pIsocDesc->cbTotal); 413 412 pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].cb = pUrb->aIsocPkts[i].cb; 414 413 pIsocDesc->cbTotal += pUrb->aIsocPkts[i].cb;
Note:
See TracChangeset
for help on using the changeset viewer.