VirtualBox

Changeset 55901 in vbox for trunk


Ignore:
Timestamp:
May 18, 2015 10:39:35 AM (10 years ago)
Author:
vboxsync
Message:

USB: Fix attaching multiple devices to the same roothub on xHCI

Location:
trunk/src/VBox/Devices/USB
Files:
2 edited

Legend:

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

    r55337 r55901  
    10141014    PVUSBROOTHUB pRh = vusbDevGetRh(pDev);
    10151015    AssertPtrReturnVoid(pRh);
    1016     if (pDev->u8Address == VUSB_DEFAULT_ADDRESS)
    1017         pRh->pDefaultAddress = NULL;
    10181016
    10191017    vusbDevAddressUnHash(pDev);
    10201018
    10211019    if (u8Address == VUSB_DEFAULT_ADDRESS)
    1022     {
    1023         if (pRh->pDefaultAddress != NULL)
    1024         {
    1025             vusbDevAddressUnHash(pRh->pDefaultAddress);
    1026             vusbDevSetState(pRh->pDefaultAddress, VUSB_DEVICE_STATE_POWERED);
    1027             Log(("2 DEFAULT ADDRS\n"));
    1028         }
    1029 
    1030         pRh->pDefaultAddress = pDev;
    10311020        vusbDevSetState(pDev, VUSB_DEVICE_STATE_DEFAULT);
    1032     }
    10331021    else
    10341022        vusbDevSetState(pDev, VUSB_DEVICE_STATE_ADDRESS);
     
    11791167    ASMAtomicXchgBool(&pDev->fTerminate, false);
    11801168    rc = RTThreadCreateF(&pDev->hUrbIoThread, vusbDevUrbIoThread, pDev, 0, RTTHREADTYPE_IO,
    1181                          RTTHREADFLAGS_WAITABLE, "USBDevIo-%d", pDev->i16Port);
     1169                         RTTHREADFLAGS_WAITABLE, "%s-%d", pDev->pUsbIns->pReg->szName,
     1170                         pDev->pUsbIns->iInstance);
    11821171    if (RT_SUCCESS(rc))
    11831172    {
     
    12331222    if (!pRh)
    12341223        AssertMsgFailedReturn(("Not attached!\n"), VERR_VUSB_DEVICE_NOT_ATTACHED);
    1235     if (pRh->pDefaultAddress == pDev)
    1236         pRh->pDefaultAddress = NULL;
    12371224
    12381225    pDev->pHub->pOps->pfnDetach(pDev->pHub, pDev);
  • trunk/src/VBox/Devices/USB/VUSBInternal.h

    r53633 r55901  
    354354    /** Address hash table. */
    355355    PVUSBDEV                apAddrHash[VUSB_ADDR_HASHSZ];
    356     /** The default address. */
    357     PVUSBDEV                pDefaultAddress;
     356
     357#if HC_ARCH_BITS == 32
     358    uint32_t                Alignment0;
     359#endif
    358360
    359361    /** Pointer to the driver instance. */
     
    365367
    366368#if HC_ARCH_BITS == 32
    367     uint32_t                Alignment0;
    368 #endif
     369    uint32_t                Alignment1;
     370#endif
     371
    369372    /** Critical section protecting the device list. */
    370373    RTCRITSECT              CritSectDevices;
     
    373376
    374377#if HC_ARCH_BITS == 32
    375     uint32_t                Alignment1;
     378    uint32_t                Alignment2;
    376379#endif
    377380
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