qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix qemu mouse Set_Protocol behavior
@ 2010-05-02  2:38 Kevin O'Connor
  2010-05-02 11:04 ` Shahar Havivi
  2010-05-03 17:02 ` Anthony Liguori
  0 siblings, 2 replies; 4+ messages in thread
From: Kevin O'Connor @ 2010-05-02  2:38 UTC (permalink / raw)
  To: qemu-devel, seabios

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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-03 17:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-02  2:38 [Qemu-devel] [PATCH] Fix qemu mouse Set_Protocol behavior Kevin O'Connor
2010-05-02 11:04 ` Shahar Havivi
2010-05-02 17:39   ` Kevin O'Connor
2010-05-03 17:02 ` Anthony Liguori

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).