[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Fix qemu mouse Set_Protocol behavior
From: |
Kevin O'Connor |
Subject: |
[Qemu-devel] [PATCH] Fix qemu mouse Set_Protocol behavior |
Date: |
Sat, 1 May 2010 22:38:51 -0400 |
User-agent: |
Mutt/1.5.20 (2009-08-17) |
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;
- [Qemu-devel] [PATCH] Fix qemu mouse Set_Protocol behavior,
Kevin O'Connor <=