From: Kevin O'Connor Date: Sat, 28 May 2011 15:47:15 +0000 (-0400) Subject: Fix USB mouse Set_Protocol behavior X-Git-Tag: v0.15.0-rc0~166^2~20 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=46115ac4c4f211b5b9b4d22f7af6ebe91c79a05c;p=qemu.git Fix USB mouse Set_Protocol behavior 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 --- diff --git a/hw/usb-hid.c b/hw/usb-hid.c index 53b261c3b..8197a8654 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;