Received: from eggs.gnu.org ([140.186.70.92]:36861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQLjT-0001fJ-1Z for qemu-devel@nongnu.org; Sat, 28 May 2011 11:47:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQLjR-00051E-T9 for qemu-devel@nongnu.org; Sat, 28 May 2011 11:47:19 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:37204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQLjR-000518-R9 for qemu-devel@nongnu.org; Sat, 28 May 2011 11:47:17 -0400 Received: by qwj8 with SMTP id 8so1492570qwj.4 for ; Sat, 28 May 2011 08:47:16 -0700 (PDT) Date: Sat, 28 May 2011 11:47:15 -0400 From: Kevin O'Connor Message-ID: <20110528154715.GA27635@morn.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [RESEND][PATCH 1/2] Fix USB mouse Set_Protocol behavior List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann The QEMU USB mouse claims to support the "boot" protocol (bInterfaceSubClass is 1). However, the mouse rejects the Set_Protocol command. The qemu mouse does support the "boot" protocol specification, so a simple fix is to enable the Set_Protocol request. Signed-off-by: Kevin O'Connor --- hw/usb-hid.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb-hid.c b/hw/usb-hid.c index 89c293c..268669b 100644 --- a/hw/usb-hid.c +++ b/hw/usb-hid.c @@ -779,13 +779,13 @@ static int usb_hid_handle_control(USBDevice *dev, int request, int value, goto fail; break; case GET_PROTOCOL: - if (s->kind != USB_KEYBOARD) + if (s->kind != USB_KEYBOARD && s->kind != USB_MOUSE) goto fail; ret = 1; data[0] = s->protocol; break; case SET_PROTOCOL: - if (s->kind != USB_KEYBOARD) + if (s->kind != USB_KEYBOARD && s->kind != USB_MOUSE) goto fail; ret = 0; s->protocol = value; -- 1.7.4.4