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.
I do not understand why. is it possible, that is was NACKed, because it was the second SET CONFIGURATION request (because it seems that the host already sent a SET CONFIGURATION request before QEMU tried to claim the device)?
Anyway, I wrote a simple program to "fake" a successful call to libusb_set_configuration and did an LD_PRELOAD on this program before starting qemu, and it worked.
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_set_configuration failes, so that's probably the problem.
Though the actual problem may be in the USB device, shouldn't QEMU be more conservative if libusb_set_configuration fails and try to claim the device anyway?
-- Manfred Härtel, DB3HM mailto:[email protected] http://rz-home.de/mhaertel
