On 2012.05.01 16:52, Uri Lublin wrote:
Only if old backend api is UNSUPPORTED.This happens when a libusb driver (e.g. WinUSB) is installed after a device has been setup/discovered (with get_device_list).
I'm currently testing this, so that I can review the patch, but I'm not seeing much of an issue with the original code.
I'm using a modified xusb with the following patch: ------------------------------------------------------------------------- diff --git a/examples/xusb.c b/examples/xusb.c index c811353..c1b8fad 100644 --- a/examples/xusb.c +++ b/examples/xusb.c @@ -598,8 +598,13 @@ static int test_device(uint16_t vid, uint16_t pid) handle = libusb_open_device_with_vid_pid(NULL, vid, pid); if (handle == NULL) { - perr(" Failed.\n"); - return -1; + perr("Please install driver NOW!"); + while(getchar() != 0x0A); + handle = libusb_open_device_with_vid_pid(NULL, vid, pid); + if (handle == NULL) { + perr(" Failed.\n"); + return -1; + } } dev = libusb_get_device(handle); -------------------------------------------------------------------------Even as I am not going through a libusb reinit before trying to access the device after the driver has been installed, once the driver has been installed, libusb has no trouble communicating with the device.
Attached is the full log of what I get when installing a WinUSB driver mid-test (look for "Please install driver NOW!"). You'll notice that we go straight into a libusb_get_device_list() after the driver has been installed, due to the second libusb_open... call, and everything behaves as expected.
From these results, the only reason I'd see a need for the patch is if we want to address the potential issue of the driver installation ending right when we are in the middle of detecting devices, in which case we may get a different driver landscape between passes, but, with driver installation being so slow on Windows that's probably a one in a million chance (i.e. even if you wanted, you wouldn't be able to ensure that your driver installation ends right when you're issuing a libusb_get_device_list to be able to disturb it). Either that or you're probably issuing way more libusb_get_device_list calls than you should.
All in all, I'm not seeing a real issue with being able to install a driver after libusb_init has been issued and access the device right now. Unless you can produce a scenario disproving what I currently see as a very low probability for the issue to manifest itself, I would still motion to wait for hotplug to review our enumeration behaviour.
Regards, /Pete
D:\libusbx\Win32\Debug\examples>xusb -x -d Using libusbx v1.0.11.10499 [timestamp] [threadID] facility level [function call] <message> -------------------------------------------------------------------------------- [ 0.000000] [00001208] libusbx: debug [libusb_init] [ 0.020000] [00001208] libusbx: debug [init_polling] Will use CancelIoEx for I/O cancellation [ 0.030000] [00001208] libusbx: debug [htab_create] using 1021 entries hash table [ 0.040000] [00001208] libusbx: debug [usbi_add_pollfd] add fd 3 events 1 [ 0.030000] [0000126c] libusbx: debug [windows_clock_gettime_threaded] hires timer available (Frequency: 2083388 Hz) [ 0.040000] [00001208] libusbx: debug [libusb_init] created default context Opening device... [ 0.057000] [00001208] libusbx: debug [libusb_get_device_list] [ 0.066001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [C9] [ 0.069001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [129] [ 0.072001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [231] [ 0.072001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [340] [ 0.072001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [11F] [ 0.082001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [227] [ 0.082001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [364] [ 0.082001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [28A] [ 0.102001] [00001208] libusbx: debug [get_api_type] driver(s): NUSB3HUB [ 0.102001] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [ 0.102001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [D8] [ 0.112001] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [ 0.112001] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [ 0.112001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [33B] [ 0.122001] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [ 0.122001] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [ 0.122001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [3EF] [ 0.132001] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [ 0.132001] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [ 0.132001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [388] [ 0.142001] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [ 0.142001] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [ 0.142001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [7A] [ 0.152001] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [ 0.152001] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [ 0.152001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [FF] [ 0.162001] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [ 0.162001] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [ 0.162001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [170] [ 0.172001] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [ 0.172001] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [ 0.172001] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [1A9] [ 0.182002] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [ 0.182002] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [ 0.182002] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [A0] [ 0.192002] [00001208] libusbx: debug [get_api_type] driver(s): NUSB3HUB [ 0.192002] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [ 0.192002] [00001208] libusbx: debug [htab_hash] hash collision ('\\.\USB#VID_045E&PID_0288#6&B8310AF&0&4' vs '\\.\PCI#VEN_8086&DEV_2836&SUBSYS_81EC1043&REV_02#3&11583659&0&EF') [ 0.202002] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [3FC] [ 0.202002] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [33B] (0.0) [ 0.212002] [00001208] libusbx: debug [init_device] (bus: 2, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB#4&10B2C51B&1' [ 0.212002] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [3EF] (0.0) [ 0.212002] [00001208] libusbx: debug [init_device] (bus: 5, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB#4&2600A89F&1' [ 0.222002] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [388] (0.0) [ 0.222002] [00001208] libusbx: debug [init_device] (bus: 3, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB#4&270D945D&1' [ 0.222002] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [7A] (0.0) [ 0.232002] [00001208] libusbx: debug [init_device] (bus: 4, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB#4&2FB3158C&1' [ 0.232002] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [FF] (0.0) [ 0.232002] [00001208] libusbx: debug [init_device] (bus: 6, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB#4&3B6FF112&1' [ 0.242002] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [170] (0.0) [ 0.242002] [00001208] libusbx: debug [init_device] (bus: 8, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB20#4&1087794A&1' [ 0.242002] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [1A9] (0.0) [ 0.252002] [00001208] libusbx: debug [init_device] (bus: 7, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB20#4&27A8BD23&1' [ 0.252002] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [A0] (0.0) [ 0.252002] [00001208] libusbx: debug [init_device] found 1 configurations (active conf: 1) [ 0.252002] [00001208] libusbx: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 41 bytes) [ 0.262002] [00001208] libusbx: debug [init_device] (bus: 7, addr: 1, depth: 1, port: 4): '\\.\USB#VID_0424&PID_A700#5&2CF28E88&0&4' [ 0.262002] [00001208] libusbx: debug [htab_hash] hash collision ('\\.\USB#VID_045E&PID_0288#6&B8310AF&0&4' vs '\\.\PCI#VEN_8086&DEV_2836&SUBSYS_81EC1043&REV_02#3&11583659&0&EF') [ 0.272002] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [3FC] (0.0) [ 0.272002] [00001208] libusbx: debug [init_device] got bus number from ancestor #2 [ 0.272002] [00001208] libusbx: debug [init_device] found 1 configurations (active conf: 1) [ 0.282002] [00001208] libusbx: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 25 bytes) [ 0.282002] [00001208] libusbx: debug [init_device] (bus: 1, addr: 1, depth: 1, port: 4): '\\.\USB#VID_045E&PID_0288#6&B8310AF&0&4' [ 0.282002] [00001208] libusbx: debug [discovered_devs_append] need to increase capacity [ 0.292002] [00001208] libusbx: info [windows_get_device_list] The following device has no driver: '\\.\USB#VID_045E&PID_0289#7&1ABB1A1B&0&1' [ 0.292002] [00001208] libusbx: info [windows_get_device_list] libusbx will not be able to access it. [ 0.292002] [00001208] libusbx: debug [htab_hash] hash collision ('\\.\USB#VID_045E&PID_0288#6&B8310AF&0&4' vs '\\.\PCI#VEN_8086&DEV_2836&SUBSYS_81EC1043&REV_02#3&11583659&0&EF') [ 0.302002] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [1A4] [ 0.302002] [00001208] libusbx: debug [init_device] found 1 configurations (active conf: 0) [ 0.312002] [00001208] libusbx: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 32 bytes) [ 0.312002] [00001208] libusbx: debug [init_device] (bus: 1, addr: 2, depth: 2, port: 1): '\\.\USB#VID_045E&PID_0289#7&1ABB1A1B&0&1' [ 0.312002] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [13D] [ 0.322002] [00001208] libusbx: debug [init_device] found 1 configurations (active conf: 1) [ 0.322002] [00001208] libusbx: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 34 bytes) [ 0.322002] [00001208] libusbx: debug [init_device] (bus: 7, addr: 2, depth: 2, port: 1): '\\.\USB#VID_046D&PID_C03E#6&37DA4E23&0&1' [ 0.332002] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [D8] (1.0) [ 0.332002] [00001208] libusbx: debug [init_device] (bus: 1, addr: 255, depth: 0, port: 0): '\\.\NUSB3#ROOT_HUB30#5&64848EE&0' [ 0.342002] [00001208] libusbx: debug [get_api_type] driver(s): HIDUSB [ 0.342002] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [13D] (7.2) [ 0.342002] [00001208] libusbx: debug [libusb_unref_device] destroy device 1.0 [ 0.342002] [00001208] libusbx: debug [libusb_unref_device] destroy device 2.0 [ 0.352002] [00001208] libusbx: debug [libusb_unref_device] destroy device 3.0 [ 0.352002] [00001208] libusbx: debug [libusb_unref_device] destroy device 4.0 [ 0.352002] [00001208] libusbx: debug [libusb_unref_device] destroy device 5.0 [ 0.362002] [00001208] libusbx: debug [libusb_unref_device] destroy device 6.0 [ 0.362002] [00001208] libusbx: debug [libusb_unref_device] destroy device 7.0 [ 0.362002] [00001208] libusbx: debug [libusb_unref_device] destroy device 8.0 [ 0.372002] [00001208] libusbx: debug [libusb_get_device_descriptor] [ 0.372002] [00001208] libusbx: debug [libusb_get_device_descriptor] [ 0.372002] [00001208] libusbx: debug [libusb_get_device_descriptor] [ 0.382002] [00001208] libusbx: debug [libusb_get_device_descriptor] [ 0.382002] [00001208] libusbx: debug [libusb_get_device_descriptor] [ 0.382002] [00001208] libusbx: debug [libusb_get_device_descriptor] [ 0.382002] [00001208] libusbx: debug [libusb_get_device_descriptor] [ 0.392002] [00001208] libusbx: debug [libusb_get_device_descriptor] [ 0.392002] [00001208] libusbx: debug [libusb_get_device_descriptor] [ 0.392002] [00001208] libusbx: debug [libusb_get_device_descriptor] [ 0.402002] [00001208] libusbx: debug [libusb_open] open 1.2 [ 0.402002] [00001208] libusbx: debug [unsupported_open] unsupported API call for 'open' (unrecognized device driver) [ 0.402002] [00001208] libusbx: debug [libusb_open] open 1.2 returns -12 [ 0.412002] [00001208] libusbx: debug [libusb_unref_device] destroy device 2.255 [ 0.412002] [00001208] libusbx: debug [libusb_unref_device] destroy device 5.255 [ 0.412002] [00001208] libusbx: debug [libusb_unref_device] destroy device 3.255 [ 0.422002] [00001208] libusbx: debug [libusb_unref_device] destroy device 4.255 [ 0.422002] [00001208] libusbx: debug [libusb_unref_device] destroy device 6.255 [ 0.422002] [00001208] libusbx: debug [libusb_unref_device] destroy device 8.255 [ 0.432002] [00001208] libusbx: debug [libusb_unref_device] destroy device 7.255 [ 0.432002] [00001208] libusbx: debug [libusb_unref_device] destroy device 7.1 [ 0.432002] [00001208] libusbx: debug [libusb_unref_device] destroy device 1.1 [ 0.442002] [00001208] libusbx: debug [libusb_unref_device] destroy device 1.2 [ 0.442002] [00001208] libusbx: debug [libusb_unref_device] destroy device 7.2 [ 0.442002] [00001208] libusbx: debug [libusb_unref_device] destroy device 1.255 Please install driver NOW! [15.410086] [00001208] libusbx: debug [libusb_get_device_list] [15.420086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [C9] [15.420086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [129] [15.420086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [231] [15.420086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [340] [15.430086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [11F] [15.430086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [227] [15.430086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [364] [15.440086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [28A] [15.440086] [00001208] libusbx: debug [get_api_type] driver(s): NUSB3HUB [15.450086] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [15.450086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [D8] [15.450086] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [15.460086] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [15.460086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [33B] [15.460086] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [15.460086] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [15.470086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [3EF] [15.470086] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [15.470086] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [15.480086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [388] [15.480086] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [15.480086] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [15.490086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [7A] [15.490086] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [15.490086] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [15.500086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [FF] [15.500086] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [15.500086] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [15.510086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [170] [15.510086] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [15.510086] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [15.520086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [1A9] [15.520086] [00001208] libusbx: debug [get_api_type] driver(s): USBHUB [15.520086] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [15.530086] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [A0] [15.530086] [00001208] libusbx: debug [get_api_type] driver(s): NUSB3HUB [15.530086] [00001208] libusbx: debug [get_api_type] matched driver name against HUB API [15.540087] [00001208] libusbx: debug [htab_hash] hash collision ('\\.\USB#VID_045E&PID_0288#6&B8310AF&0&4' vs '\\.\PCI#VEN_8086&DEV_2836&SUBSYS_81EC1043&REV_02#3&11583659&0&EF') [15.540087] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [3FC] [15.550087] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [33B] (0.0) [15.550087] [00001208] libusbx: debug [init_device] (bus: 2, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB#4&10B2C51B&1' [15.550087] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [3EF] (0.0) [15.560087] [00001208] libusbx: debug [init_device] (bus: 5, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB#4&2600A89F&1' [15.560087] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [388] (0.0) [15.560087] [00001208] libusbx: debug [init_device] (bus: 3, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB#4&270D945D&1' [15.571087] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [7A] (0.0) [15.571087] [00001208] libusbx: debug [init_device] (bus: 4, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB#4&2FB3158C&1' [15.571087] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [FF] (0.0) [15.571087] [00001208] libusbx: debug [init_device] (bus: 6, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB#4&3B6FF112&1' [15.581087] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [170] (0.0) [15.581087] [00001208] libusbx: debug [init_device] (bus: 8, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB20#4&1087794A&1' [15.591087] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [1A9] (0.0) [15.591087] [00001208] libusbx: debug [init_device] (bus: 7, addr: 255, depth: 0, port: 0): '\\.\USB#ROOT_HUB20#4&27A8BD23&1' [15.591087] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [A0] (0.0) [15.591087] [00001208] libusbx: debug [init_device] found 1 configurations (active conf: 1) [15.601087] [00001208] libusbx: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 41 bytes) [15.601087] [00001208] libusbx: debug [init_device] (bus: 7, addr: 1, depth: 1, port: 4): '\\.\USB#VID_0424&PID_A700#5&2CF28E88&0&4' [15.611087] [00001208] libusbx: debug [htab_hash] hash collision ('\\.\USB#VID_045E&PID_0288#6&B8310AF&0&4' vs '\\.\PCI#VEN_8086&DEV_2836&SUBSYS_81EC1043&REV_02#3&11583659&0&EF') [15.611087] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [3FC] (0.0) [15.611087] [00001208] libusbx: debug [init_device] got bus number from ancestor #2 [15.621087] [00001208] libusbx: debug [init_device] found 1 configurations (active conf: 1) [15.621087] [00001208] libusbx: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 25 bytes) [15.621087] [00001208] libusbx: debug [init_device] (bus: 1, addr: 1, depth: 1, port: 4): '\\.\USB#VID_045E&PID_0288#6&B8310AF&0&4' [15.631087] [00001208] libusbx: debug [discovered_devs_append] need to increase capacity [15.631087] [00001208] libusbx: debug [windows_get_device_list] extra GUID: {1F72AB11-86C8-4164-86C9-38E972DFCBC4} [15.641087] [00001208] libusbx: debug [htab_hash] hash collision ('\\.\USB#VID_045E&PID_0288#6&B8310AF&0&4' vs '\\.\PCI#VEN_8086&DEV_2836&SUBSYS_81EC1043&REV_02#3&11583659&0&EF') [15.641087] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [1A4] [15.641087] [00001208] libusbx: debug [init_device] found 1 configurations (active conf: 1) [15.651087] [00001208] libusbx: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 32 bytes) [15.651087] [00001208] libusbx: debug [init_device] (bus: 1, addr: 2, depth: 2, port: 1): '\\.\USB#VID_045E&PID_0289#7&1ABB1A1B&0&1' [15.651087] [00001208] libusbx: debug [windows_get_device_list] allocating new device for session [13D] [15.661087] [00001208] libusbx: debug [init_device] found 1 configurations (active conf: 1) [15.661087] [00001208] libusbx: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 34 bytes) [15.671087] [00001208] libusbx: debug [init_device] (bus: 7, addr: 2, depth: 2, port: 1): '\\.\USB#VID_046D&PID_C03E#6&37DA4E23&0&1' [15.671087] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [D8] (1.0) [15.671087] [00001208] libusbx: debug [init_device] (bus: 1, addr: 255, depth: 0, port: 0): '\\.\NUSB3#ROOT_HUB30#5&64848EE&0' [15.681087] [00001208] libusbx: debug [get_api_type] driver(s): WINUSB [15.681087] [00001208] libusbx: debug [get_api_type] matched driver name against WinUSB API [15.681087] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [1A4] (1.2) [15.691087] [00001208] libusbx: debug [get_api_type] driver(s): HIDUSB [15.691087] [00001208] libusbx: debug [windows_get_device_list] found existing device for session [13D] (7.2) [15.691087] [00001208] libusbx: debug [get_api_type] driver(s): WINUSB [15.701087] [00001208] libusbx: debug [get_api_type] matched driver name against WinUSB API [15.701087] [00001208] libusbx: debug [htab_hash] hash collision ('\\.\USB#VID_045E&PID_0288#6&B8310AF&0&4' vs '\\.\PCI#VEN_8086&DEV_2836&SUBSYS_81EC1043&REV_02#3&11583659&0&EF') [15.711087] [00001208] libusbx: debug [libusb_unref_device] destroy device 1.0 [15.711087] [00001208] libusbx: debug [libusb_unref_device] destroy device 2.0 [15.711087] [00001208] libusbx: debug [libusb_unref_device] destroy device 3.0 [15.721087] [00001208] libusbx: debug [libusb_unref_device] destroy device 4.0 [15.721087] [00001208] libusbx: debug [libusb_unref_device] destroy device 5.0 [15.721087] [00001208] libusbx: debug [libusb_unref_device] destroy device 6.0 [15.721087] [00001208] libusbx: debug [libusb_unref_device] destroy device 7.0 [15.731087] [00001208] libusbx: debug [libusb_unref_device] destroy device 8.0 [15.731087] [00001208] libusbx: debug [libusb_get_device_descriptor] [15.731087] [00001208] libusbx: debug [libusb_get_device_descriptor] [15.741087] [00001208] libusbx: debug [libusb_get_device_descriptor] [15.741087] [00001208] libusbx: debug [libusb_get_device_descriptor] [15.741087] [00001208] libusbx: debug [libusb_get_device_descriptor] [15.751087] [00001208] libusbx: debug [libusb_get_device_descriptor] [15.751087] [00001208] libusbx: debug [libusb_get_device_descriptor] [15.751087] [00001208] libusbx: debug [libusb_get_device_descriptor] [15.751087] [00001208] libusbx: debug [libusb_get_device_descriptor] [15.761087] [00001208] libusbx: debug [libusb_get_device_descriptor] [15.761087] [00001208] libusbx: debug [libusb_open] open 1.2 [15.761087] [00001208] libusbx: debug [libusb_unref_device] destroy device 2.255 [15.771087] [00001208] libusbx: debug [libusb_unref_device] destroy device 5.255 [15.771087] [00001208] libusbx: debug [libusb_unref_device] destroy device 3.255 [15.771087] [00001208] libusbx: debug [libusb_unref_device] destroy device 4.255 [15.771087] [00001208] libusbx: debug [libusb_unref_device] destroy device 6.255 [15.781087] [00001208] libusbx: debug [libusb_unref_device] destroy device 8.255 [15.781087] [00001208] libusbx: debug [libusb_unref_device] destroy device 7.255 [15.781087] [00001208] libusbx: debug [libusb_unref_device] destroy device 7.1 [15.791087] [00001208] libusbx: debug [libusb_unref_device] destroy device 1.1 [15.791087] [00001208] libusbx: debug [libusb_unref_device] destroy device 7.2 [15.791087] [00001208] libusbx: debug [libusb_unref_device] destroy device 1.255 speed: 12 Mbit/s (USB 1.0 FullSpeed) Reading device descriptor: [15.811087] [00001208] libusbx: debug [libusb_get_device_descriptor] length: 18 device class: 0 S/N: 0 VID:PID: 045E:0289 bcdDevice: 0121 iMan:iProd:iSer: 0:0:0 nb confs: 1 Reading configuration descriptors: [15.841087] [00001208] libusbx: debug [libusb_get_config_descriptor] index 0 nb interfaces: 1 interface[0]: id = 0 interface[0].altsetting[0]: num endpoints = 2 Class.SubClass.Protocol: 58.42.00 endpoint[0].address: 81 max packet size: 0020 polling interval: 04 endpoint[1].address: 02 max packet size: 0020 polling interval: 04 Claiming interface 0... [15.881087] [00001208] libusbx: debug [libusb_claim_interface] interface 0 [15.881087] [00001208] libusbx: debug [winusb_claim_interface] claimed interface 0 [15.881087] [00001208] libusbx: debug [libusb_get_config_descriptor] index 0 [15.891087] [00001208] libusbx: debug [windows_assign_endpoints] (re)assigned endpoint 81 to interface 0 [15.891087] [00001208] libusbx: debug [windows_assign_endpoints] (re)assigned endpoint 02 to interface 0 Reading string descriptors: [15.901087] [00001208] libusbx: debug [winusb_submit_control_transfer] will use interface 0 [15.901087] [00001208] libusbx: debug [usbi_add_pollfd] add fd 4 events 1 [15.901087] [00001208] libusbx: debug [libusb_get_next_timeout] next timeout in 0.992801s [15.911087] [00001208] libusbx: debug [libusb_handle_events_timeout_completed] doing our own event handling [15.911087] [00001208] libusbx: debug [handle_events] poll() 2 fds with timeout in 993ms [15.911087] [00001208] libusbx: debug [handle_events] poll() returned 1 [15.921087] [00001208] libusbx: debug [windows_handle_events] checking fd 3 with revents = 0000 [15.921087] [00001208] libusbx: debug [windows_handle_events] checking fd 4 with revents = 0001 [15.921087] [00001208] libusbx: debug [usbi_remove_pollfd] remove fd 4 [15.921087] [00001208] libusbx: debug [windows_transfer_callback] handling I/O completion with errcode 31 [15.931087] [00001208] libusbx: debug [windows_transfer_callback] detected endpoint stall [15.931087] [00001208] libusbx: debug [usbi_handle_transfer_completion] transfer 0071F208 has callback 003F67D0 [15.941087] [00001208] libusbx: debug [ctrl_transfer_cb] actual_length=0 Reading XBox Input Report... [15.941087] [00001208] libusbx: debug [winusb_submit_control_transfer] will use interface 0 [15.951087] [00001208] libusbx: debug [usbi_add_pollfd] add fd 4 events 1 [15.951087] [00001208] libusbx: debug [libusb_get_next_timeout] next timeout in 0.992800s [15.951087] [00001208] libusbx: debug [libusb_handle_events_timeout_completed] doing our own event handling [15.961087] [00001208] libusbx: debug [handle_events] poll() 2 fds with timeout in 993ms [15.961087] [00001208] libusbx: debug [handle_events] poll() returned 1 [15.961087] [00001208] libusbx: debug [windows_handle_events] checking fd 3 with revents = 0000 [15.971087] [00001208] libusbx: debug [windows_handle_events] checking fd 4 with revents = 0001 [15.971087] [00001208] libusbx: debug [usbi_remove_pollfd] remove fd 4 [15.971087] [00001208] libusbx: debug [windows_transfer_callback] handling I/O completion with errcode 0 [15.981087] [00001208] libusbx: debug [usbi_handle_transfer_completion] transfer 0071F208 has callback 003F67D0 [15.981087] [00001208] libusbx: debug [ctrl_transfer_cb] actual_length=20 D-pad: 00 Start:0, Back:0, Left Stick Press:0, Right Stick Press:0 A:0, B:0, X:0, Y:0, White:0, Black:0 Left Trigger: 0, Right Trigger: 0 Left Analog (X,Y): (-642,4494) Right Analog (X,Y): (3852,-5136) Writing XBox Controller Output Report... [16.011087] [00001208] libusbx: debug [winusb_submit_control_transfer] will use interface 0 [16.011087] [00001208] libusbx: debug [usbi_add_pollfd] add fd 4 events 1 [16.011087] [00001208] libusbx: debug [libusb_get_next_timeout] next timeout in 0.994241s [16.021087] [00001208] libusbx: debug [libusb_handle_events_timeout_completed] doing our own event handling [16.021087] [00001208] libusbx: debug [handle_events] poll() 2 fds with timeout in 995ms [16.021087] [00001208] libusbx: debug [handle_events] poll() returned 1 [16.031087] [00001208] libusbx: debug [windows_handle_events] checking fd 3 with revents = 0000 [16.031087] [00001208] libusbx: debug [windows_handle_events] checking fd 4 with revents = 0001 [16.031087] [00001208] libusbx: debug [usbi_remove_pollfd] remove fd 4 [16.041087] [00001208] libusbx: debug [windows_transfer_callback] handling I/O completion with errcode 0 [16.041087] [00001208] libusbx: debug [usbi_handle_transfer_completion] transfer 0071F208 has callback 003F67D0 [16.041087] [00001208] libusbx: debug [ctrl_transfer_cb] actual_length=6 Writing XBox Controller Output Report... [18.041090] [00001208] libusbx: debug [winusb_submit_control_transfer] will use interface 0 [18.041090] [00001208] libusbx: debug [usbi_add_pollfd] add fd 4 events 1 [18.051090] [00001208] libusbx: debug [libusb_get_next_timeout] next timeout in 0.992801s [18.051090] [00001208] libusbx: debug [libusb_handle_events_timeout_completed] doing our own event handling [18.051090] [00001208] libusbx: debug [handle_events] poll() 2 fds with timeout in 993ms [18.061090] [00001208] libusbx: debug [handle_events] poll() returned 1 [18.061090] [00001208] libusbx: debug [windows_handle_events] checking fd 3 with revents = 0000 [18.061090] [00001208] libusbx: debug [windows_handle_events] checking fd 4 with revents = 0001 [18.071090] [00001208] libusbx: debug [usbi_remove_pollfd] remove fd 4 [18.071090] [00001208] libusbx: debug [windows_transfer_callback] handling I/O completion with errcode 0 [18.071090] [00001208] libusbx: debug [usbi_handle_transfer_completion] transfer 0071F208 has callback 003F67D0 [18.081090] [00001208] libusbx: debug [ctrl_transfer_cb] actual_length=6 Releasing interface 0... [18.081090] [00001208] libusbx: debug [libusb_release_interface] interface 0 Closing device... [18.091090] [00001208] libusbx: debug [libusb_close] [18.091090] [00001208] libusbx: debug [libusb_unref_device] destroy device 1.2 [18.101090] [00001208] libusbx: debug [libusb_exit] [18.101090] [00001208] libusbx: debug [libusb_exit] destroying default context [18.101090] [00001208] libusbx: debug [usbi_remove_pollfd] remove fd 3 [18.111090] [0000126c] libusbx: debug [windows_clock_gettime_threaded] timer thread quitting
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel