[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/9] usb: accept usb3 control requests
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 3/9] usb: accept usb3 control requests |
Date: |
Mon, 6 Feb 2017 12:28:15 +0100 |
Windows 10 reportedly sends these, so accept them in case
the device in question is a superspeed (usb3) device.
Signed-off-by: Gerd Hoffmann <address@hidden>
Message-id: address@hidden
---
hw/usb/desc.c | 7 +++++++
include/hw/usb.h | 2 ++
2 files changed, 9 insertions(+)
diff --git a/hw/usb/desc.c b/hw/usb/desc.c
index 7828e52..c36bf30 100644
--- a/hw/usb/desc.c
+++ b/hw/usb/desc.c
@@ -774,6 +774,13 @@ int usb_desc_handle_control(USBDevice *dev, USBPacket *p,
trace_usb_set_device_feature(dev->addr, value, ret);
break;
+ case DeviceOutRequest | USB_REQ_SET_SEL:
+ case DeviceOutRequest | USB_REQ_SET_ISOCH_DELAY:
+ if (dev->speed == USB_SPEED_SUPER) {
+ ret = 0;
+ }
+ break;
+
case InterfaceRequest | USB_REQ_GET_INTERFACE:
if (index < 0 || index >= dev->ninterfaces) {
break;
diff --git a/include/hw/usb.h b/include/hw/usb.h
index 43838c9..c42b29c 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -135,6 +135,8 @@
#define USB_REQ_GET_INTERFACE 0x0A
#define USB_REQ_SET_INTERFACE 0x0B
#define USB_REQ_SYNCH_FRAME 0x0C
+#define USB_REQ_SET_SEL 0x30
+#define USB_REQ_SET_ISOCH_DELAY 0x31
#define USB_DEVICE_SELF_POWERED 0
#define USB_DEVICE_REMOTE_WAKEUP 1
--
1.8.3.1
- [Qemu-devel] [PULL 0/9] usb: various bugfixes, mostly xhci., Gerd Hoffmann, 2017/02/06
- [Qemu-devel] [PULL 8/9] usb: ccid: check ccid apdu length, Gerd Hoffmann, 2017/02/06
- [Qemu-devel] [PULL 3/9] usb: accept usb3 control requests,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 4/9] xhci: only free completed transfers, Gerd Hoffmann, 2017/02/06
- [Qemu-devel] [PULL 1/9] hw/usb/dev-hid: Improve guest compatibility of usb-tablet, Gerd Hoffmann, 2017/02/06
- [Qemu-devel] [PULL 7/9] xhci: guard xhci_kick_epctx against recursive calls, Gerd Hoffmann, 2017/02/06
- [Qemu-devel] [PULL 5/9] xhci: rename xhci_complete_packet to xhci_try_complete_packet, Gerd Hoffmann, 2017/02/06
- [Qemu-devel] [PULL 6/9] xhci: don't kick in xhci_submit and xhci_fire_ctl_transfer, Gerd Hoffmann, 2017/02/06
- [Qemu-devel] [PULL 2/9] usb/uas: more verbose error message, Gerd Hoffmann, 2017/02/06
- [Qemu-devel] [PULL 9/9] xhci: fix event queue IRQ handling, Gerd Hoffmann, 2017/02/06
- Re: [Qemu-devel] [PULL 0/9] usb: various bugfixes, mostly xhci., no-reply, 2017/02/06
- Re: [Qemu-devel] [PULL 0/9] usb: various bugfixes, mostly xhci., Peter Maydell, 2017/02/06