From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcJ1E-0001yz-GG for qemu-devel@nongnu.org; Tue, 02 Feb 2010 08:42:16 -0500 Received: from [199.232.76.173] (port=35440 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcJ1E-0001yj-11 for qemu-devel@nongnu.org; Tue, 02 Feb 2010 08:42:16 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcJ1C-00009j-5C for qemu-devel@nongnu.org; Tue, 02 Feb 2010 08:42:15 -0500 Received: from bu3sch.de ([62.75.166.246]:34529 helo=vs166246.vserver.de) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NcJ1B-00008Q-JZ for qemu-devel@nongnu.org; Tue, 02 Feb 2010 08:42:13 -0500 Received: by vs166246.vserver.de with esmtpa (Exim 4.69) id 1NcJ17-0002Zv-Sw for qemu-devel@nongnu.org; Tue, 02 Feb 2010 13:42:10 +0000 From: Michael Buesch Date: Tue, 2 Feb 2010 14:42:06 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201002021442.07991.mb@bu3sch.de> Subject: [Qemu-devel] usb-host quirks List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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.