All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RESEND][PATCH 1/2] Fix USB mouse Set_Protocol behavior
@ 2011-05-28 15:47 Kevin O'Connor
  2011-05-30  6:55 ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin O'Connor @ 2011-05-28 15:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

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>
---
 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 89c293c..268669b 100644
--- a/hw/usb-hid.c
+++ b/hw/usb-hid.c
@@ -779,13 +779,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.4.4

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

* Re: [Qemu-devel] [RESEND][PATCH 1/2] Fix USB mouse Set_Protocol behavior
  2011-05-28 15:47 [Qemu-devel] [RESEND][PATCH 1/2] Fix USB mouse Set_Protocol behavior Kevin O'Connor
@ 2011-05-30  6:55 ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2011-05-30  6:55 UTC (permalink / raw)
  To: Kevin O'Connor; +Cc: qemu-devel

On 05/28/11 17:47, Kevin O'Connor wrote:
> 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.

Added to the usb patch queue (both).

thanks,
   Gerd

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

end of thread, other threads:[~2011-05-30  6:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-28 15:47 [Qemu-devel] [RESEND][PATCH 1/2] Fix USB mouse Set_Protocol behavior Kevin O'Connor
2011-05-30  6:55 ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.