Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O8P58-0007fo-CC for qemu-devel@nongnu.org; Sat, 01 May 2010 22:38:58 -0400 Received: from [140.186.70.92] (port=52445 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8P56-0007fg-4P for qemu-devel@nongnu.org; Sat, 01 May 2010 22:38:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O8P54-0004nZ-P7 for qemu-devel@nongnu.org; Sat, 01 May 2010 22:38:56 -0400 Received: from mail-qy0-f188.google.com ([209.85.221.188]:52104) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8P54-0004nE-Md for qemu-devel@nongnu.org; Sat, 01 May 2010 22:38:54 -0400 Received: by qyk26 with SMTP id 26so2166615qyk.19 for ; Sat, 01 May 2010 19:38:53 -0700 (PDT) Date: Sat, 1 May 2010 22:38:51 -0400 From: Kevin O'Connor Message-ID: <20100502023851.GA16268@morn.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] Fix qemu mouse Set_Protocol behavior List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, seabios@seabios.org 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 just enable the Set_Portocol request. -Kevin --- a/hw/usb-hid.c +++ b/hw/usb-hid.c @@ -790,13 +790,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;