提交 46115ac4 编写于 作者: K Kevin O'Connor 提交者: Gerd Hoffmann

Fix USB mouse Set_Protocol behavior

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: NKevin O'Connor <kevin@koconnor.net>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 d0539307
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册