Changeset 37042 in vbox for trunk/src/VBox/HostDrivers/VBoxUSB/win
- Timestamp:
- May 11, 2011 7:04:07 PM (14 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxUSB/win/mon
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp
r37038 r37042 668 668 { 669 669 PDEVICE_OBJECT pDevObj = pDevRelations->Objects[k]; 670 if (!pDevObj->DriverObject671 || !pDevObj->DriverObject->DriverName.Buffer672 || !pDevObj->DriverObject->DriverName.Length)673 {674 AssertFailed();675 continue;676 }677 678 bool fIsHub = false;679 for (int z = 0; z < RT_ELEMENTS(lpszStandardControllerName); ++z)680 {681 if (!RtlCompareUnicodeString(&szStandardControllerName[z], &pDevObj->DriverObject->DriverName, TRUE /* case insensitive */))682 {683 fIsHub = true;684 break;685 }686 }687 688 if (fIsHub)689 {690 Log(("Found sub-hub, PDO 0x%p\n", pDevObj));691 continue;692 }693 670 694 671 Log(("Found existing USB PDO 0x%p\n", pDevObj)); … … 706 683 else 707 684 { 708 ObDereferenceObject(pDev Relations->Objects[k]);685 ObDereferenceObject(pDevObj); 709 686 } 710 687 … … 719 696 720 697 VBOXUSBFLT_DEVICE Device; 721 Status = vboxUsbFltDevPopulate(&Device, pDev Relations->Objects[k]/*, FALSE /* only need filter properties */);698 Status = vboxUsbFltDevPopulate(&Device, pDevObj /*, FALSE /* only need filter properties */); 722 699 if (NT_SUCCESS(Status)) 723 700 { … … 733 710 { 734 711 /* this device should not be filtered, and it's not */ 735 ObDereferenceObject(pDev Relations->Objects[k]);712 ObDereferenceObject(pDevObj); 736 713 pDevRelations->Objects[k] = NULL; 737 714 --cReplugPdos; -
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbHook.cpp
r36968 r37042 164 164 } 165 165 166 #define PVBOXUSBHOOK_REQUEST_FROM_LE(_pLe) ( (PVBOXUSBHOOK_REQUEST)( ((uint8_t*)(_pLe)) - RT_OFFSETOF(VBOXUSBHOOK_REQUEST, ListEntry) ) ) 167 168 VOID VBoxUsbHookVerifyCompletion(PVBOXUSBHOOK_ENTRY pHook, PVBOXUSBHOOK_REQUEST pRequest, PIRP pIrp) 169 { 170 KIRQL oldIrql; 171 KeAcquireSpinLock(&pHook->Lock, &oldIrql); 172 for (PLIST_ENTRY pLe = pHook->RequestList.Flink; pLe != &pHook->RequestList; pLe = pLe->Flink) 173 { 174 PVBOXUSBHOOK_REQUEST pCur = PVBOXUSBHOOK_REQUEST_FROM_LE(pLe); 175 if (pCur != pRequest) 176 continue; 177 if (pCur->pIrp != pIrp) 178 continue; 179 AssertFailed(); 180 } 181 KeReleaseSpinLock(&pHook->Lock, oldIrql); 182 183 } -
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbHook.h
r36968 r37042 70 70 NTSTATUS VBoxUsbHookRequestMoreProcessingRequired(PVBOXUSBHOOK_ENTRY pHook, PDEVICE_OBJECT pDevObj, PIRP pIrp, PVBOXUSBHOOK_REQUEST pRequest); 71 71 NTSTATUS VBoxUsbHookRequestComplete(PVBOXUSBHOOK_ENTRY pHook, PDEVICE_OBJECT pDevObj, PIRP pIrp, PVBOXUSBHOOK_REQUEST pRequest); 72 VOID VBoxUsbHookVerifyCompletion(PVBOXUSBHOOK_ENTRY pHook, PVBOXUSBHOOK_REQUEST pRequest, PIRP pIrp); 72 73 73 74 #endif /* #ifndef ___VBoxUsbHook_h___ */ -
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp
r37038 r37042 625 625 Log(("==>PnP: Mn(%s), PDO(0x%p), IRP(0x%p), Status(0x%x)\n", vboxUsbDbgStrPnPMn(IoGetCurrentIrpStackLocation(pIrp)->MinorFunction), pDevObj, pIrp, pIrp->IoStatus.Status)); 626 626 627 return VBoxUsbHookRequestPassDownHookCompletion(&g_VBoxUsbMonGlobals.UsbHubPnPHook.Hook, pDevObj, pIrp, VBoxUsbPnPCompletion, &pCompletion->Rq); 627 NTSTATUS Status = VBoxUsbHookRequestPassDownHookCompletion(&g_VBoxUsbMonGlobals.UsbHubPnPHook.Hook, pDevObj, pIrp, VBoxUsbPnPCompletion, &pCompletion->Rq); 628 #ifdef DEBUG 629 if (Status != STATUS_PENDING) 630 { 631 VBoxUsbHookVerifyCompletion(&g_VBoxUsbMonGlobals.UsbHubPnPHook.Hook, &pCompletion->Rq, pIrp); 632 } 633 #endif 634 return Status; 628 635 } 629 636
Note:
See TracChangeset
for help on using the changeset viewer.