mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-22 02:45:11 -04:00
[enum] add workaround for the lousy ASMedia USB 3.0 stack
* This occurs on Windows 7 with the ASMedia proprietary USB 3.0 controller drivers.
This commit is contained in:
parent
e62ab37e38
commit
fd093127d2
2 changed files with 14 additions and 9 deletions
13
src/dev.c
13
src/dev.c
|
@ -92,9 +92,15 @@ static BOOL GetUSBProperties(char* parent_path, char* device_id, usb_device_prop
|
|||
goto out;
|
||||
}
|
||||
|
||||
props->vid = conn_info.DeviceDescriptor.idVendor;
|
||||
props->pid = conn_info.DeviceDescriptor.idProduct;
|
||||
props->speed = conn_info.Speed + 1;
|
||||
// Some poorly written proprietary Windows 7 USB 3.0 controller drivers (<cough>ASMedia<cough>)
|
||||
// have a screwed up implementation of IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX that succeeds
|
||||
// but returns zeroed data => Add a workaround so that we don't lose our VID:PID...
|
||||
if ((conn_info.DeviceDescriptor.idVendor != 0) || (conn_info.DeviceDescriptor.idProduct != 0)) {
|
||||
props->vid = conn_info.DeviceDescriptor.idVendor;
|
||||
props->pid = conn_info.DeviceDescriptor.idProduct;
|
||||
props->speed = conn_info.Speed + 1;
|
||||
r = TRUE;
|
||||
}
|
||||
|
||||
// In their great wisdom, Microsoft decided to BREAK the USB speed report between Windows 7 and Windows 8
|
||||
if (nWindowsVersion >= WINDOWS_8) {
|
||||
|
@ -111,7 +117,6 @@ static BOOL GetUSBProperties(char* parent_path, char* device_id, usb_device_prop
|
|||
props->is_LowerSpeed = TRUE;
|
||||
}
|
||||
}
|
||||
r = TRUE;
|
||||
|
||||
out:
|
||||
safe_closehandle(handle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue