From patchwork Sun May 2 02:38:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Fix qemu mouse Set_Protocol behavior Date: Sat, 01 May 2010 16:38:51 -0000 From: Kevin O'Connor X-Patchwork-Id: 51459 Message-Id: <20100502023851.GA16268@morn.localdomain> To: qemu-devel@nongnu.org, seabios@seabios.org Cc: 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;