VirtualBox

Changeset 58642 in vbox


Ignore:
Timestamp:
Nov 10, 2015 2:11:52 PM (9 years ago)
Author:
vboxsync
Message:

USBProxyDevice: on VUSBSTATUS_DNR, retry up to 5 times (thanks Dennis Wassenberg)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/USBProxyDevice.cpp

    r57358 r58642  
    4747static void *GetStdDescSync(PUSBPROXYDEV pProxyDev, uint8_t iDescType, uint8_t iIdx, uint16_t LangId, uint16_t cbHint)
    4848{
     49#define VUSBSTATUS_DNR_RETRIES 5
     50    int cRetries = 0;
     51
    4952    LogFlow(("GetStdDescSync: pProxyDev=%s\n", pProxyDev->pUsbIns->pszName));
    5053    for (;;)
     
    105108        {
    106109            Log(("GetStdDescSync: Urb.enmStatus=%d\n", Urb.enmStatus));
     110
     111            if (Urb.enmStatus == VUSBSTATUS_DNR)
     112            {
     113                cRetries++;
     114                if (cRetries < VUSBSTATUS_DNR_RETRIES)
     115                {
     116                    Log(("GetStdDescSync: Retrying %u/%u\n", cRetries, max_retries));
     117                    continue;
     118                }
     119            }
     120
    107121            break;
    108122        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette