* [Qemu-devel] [PATCHv2] Fix USB mouse Set_Protocol behavior
@ 2010-08-02 15:30 Kevin O'Connor
0 siblings, 0 replies; only message in thread
From: Kevin O'Connor @ 2010-08-02 15:30 UTC (permalink / raw)
To: qemu-devel
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 <kevin@koconnor.net>
---
Changes v1->v2:
Add signed-off-by line.
---
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 882d933..d54823d 100644
--- a/hw/usb-hid.c
+++ b/hw/usb-hid.c
@@ -791,13 +791,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;
--
1.7.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-02 15:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-02 15:30 [Qemu-devel] [PATCHv2] Fix USB mouse Set_Protocol behavior Kevin O'Connor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).