All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] usb-host quirks
Date: Tue, 2 Feb 2010 14:42:06 +0100	[thread overview]
Message-ID: <201002021442.07991.mb@bu3sch.de> (raw)

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(+)

--- 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);

-- 
Greetings, Michael.

             reply	other threads:[~2010-02-02 13:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02 13:42 Michael Buesch [this message]
2010-02-03  0:36 ` [Qemu-devel] usb-host quirks David S. Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201002021442.07991.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.