USB passthrough should not fail if SET CONFIGURATION fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Expired
|
Undecided
|
Unassigned |
Bug Description
QEMU's USB passthrough was not working for my new smartphone.
While analyzing the problem, I found out that a SET CONFIGURATION Request was NACKed by the USB device (probably because a SET CONFIGURATION request was already sent from the host to the device).
So I wrote a simple program to fake a successful call to libusb_
Looking at QEMU's code in host-libusb.c, I can see that QEMU does not try to claim the interface if its call to libusb_
I think QEMU should try to claim the device anyway even if libusb_
I did my tests against QEMU 2.6.2, but as I can see from the source code, this problem should happen on all versions.
The attached simple program, compiled as a library, loaded by LD_PRELOAD before starting QEMU, avoids the problem by faking success of libusb_ set_configurati on(), as a workaround.