Patchwork usb-host quirks

login
register
mail settings
Submitter Michael Buesch
Date Feb. 2, 2010, 1:42 p.m.
Message ID <201002021442.07991.mb@bu3sch.de>
Download mbox | patch
Permalink /patch/44285/
State New
Headers show

Comments

Michael Buesch - Feb. 2, 2010, 1:42 p.m.
Hi,

I've got a buggy device that needs a special workaround to be usable under
host-usb access. The device really doesn't like being reset via USBDEVFS_RESET. It
immediatenly locks up the device firmware or whatever. It won't respond properly anymore.
With the following patch it works fine, though.

So I was wondering what the accepted way was to get these quirks upstream into the qemu
source tree. Is usb-linux.c the correct place, or should we put the quirk into
a different place?

---
 usb-linux.c |    4 ++++
 1 file changed, 4 insertions(+)

Patch

--- qemu.orig/usb-linux.c
+++ qemu/usb-linux.c
@@ -389,6 +389,10 @@  static void usb_host_handle_reset(USBDev
 
     dprintf("husb: reset device %u.%u\n", s->bus_num, s->addr);
 
+    if (((s->descr[8] << 8) | s->descr[9]) == 0x2471 &&
+        ((s->descr[10] << 8) | s->descr[11]) == 0x0853)
+        return;
+
     ioctl(s->fd, USBDEVFS_RESET);
 
     usb_host_claim_interfaces(s, s->configuration);