[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/31] Fix USB mouse Set_Protocol behavior
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 14/31] Fix USB mouse Set_Protocol behavior |
Date: |
Mon, 6 Jun 2011 14:39:05 +0200 |
From: Kevin O'Connor <address@hidden>
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 <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
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 53b261c..8197a86 100644
--- a/hw/usb-hid.c
+++ b/hw/usb-hid.c
@@ -782,13 +782,13 @@ static int usb_hid_handle_control(USBDevice *dev,
USBPacket *p,
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.1
- [Qemu-devel] [PATCH 00/31] usb patch queue, Gerd Hoffmann, 2011/06/06
- [Qemu-devel] [PATCH 04/31] usb-ehci: trace port state, Gerd Hoffmann, 2011/06/06
- [Qemu-devel] [PATCH 01/31] usb-linux: catch ENODEV in more places., Gerd Hoffmann, 2011/06/06
- [Qemu-devel] [PATCH 02/31] usb-ehci: trace mmio and usbsts, Gerd Hoffmann, 2011/06/06
- [Qemu-devel] [PATCH 03/31] usb-ehci: trace state machine changes, Gerd Hoffmann, 2011/06/06
- [Qemu-devel] [PATCH 14/31] Fix USB mouse Set_Protocol behavior,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 11/31] ehci: fix a number of unused-but-set-variable warnings (new with gcc-4.6), Gerd Hoffmann, 2011/06/06
- [Qemu-devel] [PATCH 13/31] usb-ehci: drop EXECUTING checks., Gerd Hoffmann, 2011/06/06
[Qemu-devel] [PATCH 12/31] usb: cancel async packets on unplug, Gerd Hoffmann, 2011/06/06
[Qemu-devel] [PATCH 06/31] usb-ehci: trace buffer copy, Gerd Hoffmann, 2011/06/06
[Qemu-devel] [PATCH 09/31] usb-ehci: fix offset writeback in ehci_buffer_rw, Gerd Hoffmann, 2011/06/06
[Qemu-devel] [PATCH 10/31] usb-ehci: fix error handling., Gerd Hoffmann, 2011/06/06