Changeset 55058 in vbox for trunk/src/VBox/HostDrivers/VBoxUSB/win/dev
- Timestamp:
- Mar 31, 2015 10:29:00 PM (10 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxUSB/win/dev
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.h
r49137 r55058 190 190 } 191 191 192 static DECLHIDDEN(VOID) vboxUsbDdiStateWaitOtherCompleted(PVBOXUSBDEV_EXT pDevExt)193 {194 /* Earlier we assumed that 1 request will be pending while we service195 Device Power IRP which was leading to host hang when USB is connected196 to VM.197 With debugging found that at the point when host goes to sleep198 state and USB is connected to VM, two Power IRP requests are pending :199 One for SYSTEM and other for DEVICE.200 */201 VBoxDrvToolRefWaitEqual(&pDevExt->DdiState.Ref, 3);202 }203 204 192 #endif /* #ifndef ___VBoxUsbDev_h___ */ -
trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPnP.cpp
r36968 r55058 70 70 ENMVBOXUSB_PNPSTATE enmState = vboxUsbPnPStateGet(pDevExt); 71 71 NTSTATUS Status = STATUS_SUCCESS; 72 if (enmState == ENMVBOXUSB_PNPSTATE_STOP_PENDING) 73 { 74 IoCopyCurrentIrpStackLocationToNext(pIrp); 75 Status = VBoxDrvToolIoPostSync(pDevExt->pLowerDO, pIrp); 76 if (NT_SUCCESS(Status)) 77 { 78 vboxUsbPnPStateRestore(pDevExt); 79 } 80 } 81 else 82 { 83 Assert(0); 84 Assert(enmState == ENMVBOXUSB_PNPSTATE_STARTED); 85 } 86 72 73 IoCopyCurrentIrpStackLocationToNext(pIrp); 74 Status = VBoxDrvToolIoPostSync(pDevExt->pLowerDO, pIrp); 75 if (NT_SUCCESS(Status) && enmState == ENMVBOXUSB_PNPSTATE_STOP_PENDING) 76 { 77 vboxUsbPnPStateRestore(pDevExt); 78 } 79 80 Status = STATUS_SUCCESS; 87 81 VBoxDrvToolIoComplete(pIrp, Status, 0); 88 82 vboxUsbDdiStateRelease(pDevExt); … … 144 138 ENMVBOXUSB_PNPSTATE enmState = vboxUsbPnPStateGet(pDevExt); 145 139 NTSTATUS Status = STATUS_SUCCESS; 146 if (enmState == ENMVBOXUSB_PNPSTATE_REMOVE_PENDING) 147 { 148 IoCopyCurrentIrpStackLocationToNext(pIrp); 149 Status = VBoxDrvToolIoPostSync(pDevExt->pLowerDO, pIrp); 150 if (NT_SUCCESS(Status)) 151 { 152 vboxUsbPnPStateRestore(pDevExt); 153 } 154 } 155 else 156 { 157 Assert(0); 158 Assert(enmState == ENMVBOXUSB_PNPSTATE_STARTED); 159 } 160 140 IoCopyCurrentIrpStackLocationToNext(pIrp); 141 142 Status = VBoxDrvToolIoPostSync(pDevExt->pLowerDO, pIrp); 143 144 if (NT_SUCCESS(Status) && 145 enmState == ENMVBOXUSB_PNPSTATE_REMOVE_PENDING) 146 { 147 vboxUsbPnPStateRestore(pDevExt); 148 } 149 150 Status = STATUS_SUCCESS; 161 151 VBoxDrvToolIoComplete(pIrp, Status, 0); 162 152 vboxUsbDdiStateRelease(pDevExt); -
trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbPwr.cpp
r36968 r55058 210 210 PIRP pIrp = pCtx->pIrp; 211 211 212 vboxUsbDdiStateWaitOtherCompleted(pDevExt);213 214 212 vboxUsbPwrIoPostDev(pDevExt, pIrp); 215 213
Note:
See TracChangeset
for help on using the changeset viewer.