VirtualBox

Changeset 56395 in vbox


Ignore:
Timestamp:
Jun 12, 2015 3:12:23 PM (9 years ago)
Author:
vboxsync
Message:

VUSB: Reverted r100358, fixed xHCI device attaching differently.

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

Legend:

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

    r56292 r56395  
    10141014    PVUSBROOTHUB pRh = vusbDevGetRh(pDev);
    10151015    AssertPtrReturnVoid(pRh);
     1016    if (pDev->u8Address == VUSB_DEFAULT_ADDRESS)
     1017        pRh->pDefaultAddress = NULL;
    10161018
    10171019    vusbDevAddressUnHash(pDev);
    10181020
    10191021    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;
    10201031        vusbDevSetState(pDev, VUSB_DEVICE_STATE_DEFAULT);
     1032    }
    10211033    else
    10221034        vusbDevSetState(pDev, VUSB_DEVICE_STATE_ADDRESS);
     
    11671179    ASMAtomicXchgBool(&pDev->fTerminate, false);
    11681180    rc = RTThreadCreateF(&pDev->hUrbIoThread, vusbDevUrbIoThread, pDev, 0, RTTHREADTYPE_IO,
    1169                          RTTHREADFLAGS_WAITABLE, "%s-%d", pDev->pUsbIns->pReg->szName,
    1170                          pDev->pUsbIns->iInstance);
     1181                         RTTHREADFLAGS_WAITABLE, "USBDevIo-%d", pDev->i16Port);
    11711182    if (RT_SUCCESS(rc))
    11721183    {
     
    12221233    if (!pRh)
    12231234        AssertMsgFailedReturn(("Not attached!\n"), VERR_VUSB_DEVICE_NOT_ATTACHED);
     1235    if (pRh->pDefaultAddress == pDev)
     1236        pRh->pDefaultAddress = NULL;
    12241237
    12251238    pDev->pHub->pOps->pfnDetach(pDev->pHub, pDev);
  • trunk/src/VBox/Devices/USB/VUSBInternal.h

    r56141 r56395  
    329329    /** Address hash table. */
    330330    PVUSBDEV                apAddrHash[VUSB_ADDR_HASHSZ];
    331 
    332 #if HC_ARCH_BITS == 32
    333     uint32_t                Alignment0;
    334 #endif
     331    /** The default address. */
     332    PVUSBDEV                pDefaultAddress;
    335333
    336334    /** Pointer to the driver instance. */
     
    342340
    343341#if HC_ARCH_BITS == 32
    344     uint32_t                Alignment1;
    345 #endif
    346 
     342    uint32_t                Alignment0;
     343#endif
    347344    /** Critical section protecting the device list. */
    348345    RTCRITSECT              CritSectDevices;
     
    351348
    352349#if HC_ARCH_BITS == 32
    353     uint32_t                Alignment2;
     350    uint32_t                Alignment1;
    354351#endif
    355352
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