From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTZ66-000897-Iv for qemu-devel@nongnu.org; Mon, 06 Jun 2011 08:39:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTZ64-0005Nn-K8 for qemu-devel@nongnu.org; Mon, 06 Jun 2011 08:39:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTZ64-0005NQ-6A for qemu-devel@nongnu.org; Mon, 06 Jun 2011 08:39:56 -0400 From: Gerd Hoffmann Date: Mon, 6 Jun 2011 14:39:05 +0200 Message-Id: <1307363962-27223-15-git-send-email-kraxel@redhat.com> In-Reply-To: <1307363962-27223-1-git-send-email-kraxel@redhat.com> References: <1307363962-27223-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 14/31] Fix USB mouse Set_Protocol behavior List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin O'Connor , Gerd Hoffmann From: Kevin O'Connor 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 Signed-off-by: Gerd Hoffmann --- 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 53b261c..8197a86 100644 --- a/hw/usb-hid.c +++ b/hw/usb-hid.c @@ -782,13 +782,13 @@ static int usb_hid_handle_control(USBDevice *dev, USBPacket *p, 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.1