Changeset 108885 in vbox for trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp
- Timestamp:
- Apr 8, 2025 11:51:30 AM (2 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168339
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp
r108881 r108885 171 171 LIST_ENTRY BlackDeviceList; 172 172 VBOXUSBFLT_LOCK Lock; 173 /** Flag whether to force replugging a device we can't query descirptors from.174 * Short term workaround for @bugref{9479}. */175 ULONG dwForceReplugWhenDevPopulateFails;176 173 } VBOXUSBFLTGLOBALS, *PVBOXUSBFLTGLOBALS; 177 174 static VBOXUSBFLTGLOBALS g_VBoxUsbFltGlobals; … … 1104 1101 { 1105 1102 WARN(("vboxUsbFltDevPopulate for PDO 0x%p failed with Status 0x%x", pDevObj, Status)); 1106 if ( Status == STATUS_CANCELLED1107 && g_VBoxUsbFltGlobals.dwForceReplugWhenDevPopulateFails)1108 {1109 /*1110 * This can happen if the device got suspended and is in D3 state where we can't query any strings.1111 * There is no known way to set the power state of the device, especially if there is no driver attached yet.1112 * The sledgehammer approach is to just replug the device to force it out of suspend, see bugref @{9479}.1113 */1114 continue;1115 }1116 1103 } 1117 1104 … … 1681 1668 VBOXUSBFLT_LOCK_INIT(); 1682 1669 1683 /*1684 * Check whether the setting to force replugging USB devices when1685 * querying string descriptors fail is set in the registry,1686 * see @bugref{9479}.1687 */1688 RTL_QUERY_REGISTRY_TABLE aParams[] =1689 {1690 {vboxUsbFltRegKeyQuery, 0, (PWSTR)L"ForceReplugWhenDevPopulateFails", &g_VBoxUsbFltGlobals.dwForceReplugWhenDevPopulateFails, REG_DWORD, &g_VBoxUsbFltGlobals.dwForceReplugWhenDevPopulateFails, sizeof(ULONG) },1691 { NULL, 0, NULL, NULL, 0, 0, 0 }1692 };1693 UNICODE_STRING UnicodePath = RTL_CONSTANT_STRING(L"\\VBoxUSB");1694 1695 NTSTATUS Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, UnicodePath.Buffer, &aParams[0], NULL, NULL);1696 if (Status == STATUS_SUCCESS)1697 {1698 if (g_VBoxUsbFltGlobals.dwForceReplugWhenDevPopulateFails)1699 LOG(("Forcing replug of USB devices where querying the descriptors fail\n"));1700 }1701 else1702 LOG(("RtlQueryRegistryValues() -> %#x, assuming defaults\n", Status));1703 1704 1670 return STATUS_SUCCESS; 1705 1671 }
Note:
See TracChangeset
for help on using the changeset viewer.