- Timestamp:
- Aug 4, 2016 3:08:21 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 109601
- Location:
- trunk/src/VBox/Devices/USB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/USBProxyDevice.cpp
r62956 r62992 357 357 uint32_t altmap[4] = {0,}; 358 358 uint8_t *tmp, *end = buf + len; 359 uint8_t *orig_desc = buf;360 359 uint8_t alt; 361 360 int state; … … 762 761 static DECLCALLBACK(void) usbProxyDestruct(PPDMUSBINS pUsbIns) 763 762 { 763 PDMUSB_CHECK_VERSIONS_RETURN_VOID(pUsbIns); 764 764 PUSBPROXYDEV pThis = PDMINS_2_DATA(pUsbIns, PUSBPROXYDEV); 765 765 Log(("usbProxyDestruct: destroying pProxyDev=%s\n", pUsbIns->pszName)); … … 859 859 static DECLCALLBACK(int) usbProxyConstruct(PPDMUSBINS pUsbIns, int iInstance, PCFGMNODE pCfg, PCFGMNODE pCfgGlobal) 860 860 { 861 PDMUSB_CHECK_VERSIONS_RETURN(pUsbIns); 862 RT_NOREF(iInstance); 861 863 PUSBPROXYDEV pThis = PDMINS_2_DATA(pUsbIns, PUSBPROXYDEV); 862 864 LogFlow(("usbProxyConstruct: pUsbIns=%p iInstance=%d\n", pUsbIns, iInstance)); -
trunk/src/VBox/Devices/USB/win/USBProxyDevice-win.cpp
r62956 r62992 79 79 * Internal Functions * 80 80 *********************************************************************************************************************************/ 81 static int usbProxyWinSetInterface(PUSBPROXYDEV p, int i fnum, int setting);81 static int usbProxyWinSetInterface(PUSBPROXYDEV p, int iIf, int setting); 82 82 83 83 /** … … 90 90 static int usbProxyWinHandleUnpluggedDevice(PUSBPROXYDEV pProxyDev, DWORD dwErr) 91 91 { 92 PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32); 92 #ifdef LOG_ENABLED 93 PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32); 94 #endif 93 95 94 96 if ( dwErr == ERROR_INVALID_HANDLE_STATE … … 110 112 static DECLCALLBACK(int) usbProxyWinOpen(PUSBPROXYDEV pProxyDev, const char *pszAddress, void *pvBackend) 111 113 { 114 RT_NOREF(pvBackend); 112 115 PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32); 113 116 … … 140 143 if (DeviceIoControl(pPriv->hDev, SUPUSB_IOCTL_GET_VERSION, NULL, 0, &version, sizeof(version), &cbReturned, NULL)) 141 144 { 142 if (!( version.u32Major != USBDRV_MAJOR_VERSION 143 || version.u32Minor < USBDRV_MINOR_VERSION)) 145 if ( version.u32Major == USBDRV_MAJOR_VERSION 146 #if USBDRV_MINOR_VERSION != 0 147 && version.u32Minor >= USBDRV_MINOR_VERSION 148 #endif 149 ) 144 150 { 145 151 USBSUP_CLAIMDEV in; … … 245 251 static DECLCALLBACK(int) usbProxyWinReset(PUSBPROXYDEV pProxyDev, bool fResetOnLinux) 246 252 { 253 RT_NOREF(fResetOnLinux); 247 254 PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32); 248 255 DWORD cbReturned; … … 302 309 } 303 310 304 static DECLCALLBACK(int) usbProxyWinClaimInterface(PUSBPROXYDEV pProxyDev, int i fnum)311 static DECLCALLBACK(int) usbProxyWinClaimInterface(PUSBPROXYDEV pProxyDev, int iIf) 305 312 { 306 313 /* Called just before we use an interface. Needed on Linux to claim … … 311 318 PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32); 312 319 313 pPriv->bInterfaceNumber = i fnum;320 pPriv->bInterfaceNumber = iIf; 314 321 315 322 Assert(pPriv); … … 317 324 } 318 325 319 static DECLCALLBACK(int) usbProxyWinReleaseInterface(PUSBPROXYDEV pProxyDev, int ifnum) 320 { 326 static DECLCALLBACK(int) usbProxyWinReleaseInterface(PUSBPROXYDEV pProxyDev, int iIf) 327 { 328 RT_NOREF(pProxyDev, iIf); 321 329 /* The opposite of claim_interface. */ 322 PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32);323 324 Assert(pPriv);325 330 return VINF_SUCCESS; 326 331 } 327 332 328 static DECLCALLBACK(int) usbProxyWinSetInterface(PUSBPROXYDEV pProxyDev, int i fnum, int setting)333 static DECLCALLBACK(int) usbProxyWinSetInterface(PUSBPROXYDEV pProxyDev, int iIf, int setting) 329 334 { 330 335 /* Select an alternate setting for an interface, the same applies … … 338 343 Assert(pPriv); 339 344 340 Log(("usbproxy: Select interface of %x to %d/%d\n", pPriv->hDev, i fnum, setting));341 in.bInterfaceNumber = i fnum;345 Log(("usbproxy: Select interface of %x to %d/%d\n", pPriv->hDev, iIf, setting)); 346 in.bInterfaceNumber = iIf; 342 347 in.bAlternateSetting = setting; 343 348 … … 559 564 /* Wait for the wakeup call. */ 560 565 DWORD cMilliesWait = cMillies == RT_INDEFINITE_WAIT ? INFINITE : cMillies; 561 DWORD rc = WaitForMultipleObjects(1, &pPriv->hEventWakeup, FALSE, cMilliesWait); 566 DWORD dwRc = WaitForMultipleObjects(1, &pPriv->hEventWakeup, FALSE, cMilliesWait); 567 NOREF(dwRc); 562 568 } 563 569 … … 630 636 } 631 637 632 if (rc >= WAIT_OBJECT_0 && rc < WAIT_OBJECT_0 + cQueuedUrbs) 638 AssertCompile(WAIT_OBJECT_0 == 0); 639 if (/*rc >= WAIT_OBJECT_0 && */ rc < WAIT_OBJECT_0 + cQueuedUrbs) 633 640 { 634 641 RTCritSectEnter(&pPriv->CritSect);
Note:
See TracChangeset
for help on using the changeset viewer.