* [Qemu-devel] [PATCH 1/2] usb/uas: more verbose error message
@ 2017-01-31 13:52 Gerd Hoffmann
2017-01-31 13:52 ` [Qemu-devel] [PATCH 2/2] usb: accept usb3 control requests Gerd Hoffmann
0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2017-01-31 13:52 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Print some more details in case we get a unknown
control request, to ease trouble-shooting.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/dev-uas.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
index 3a8ff18..da2fb70 100644
--- a/hw/usb/dev-uas.c
+++ b/hw/usb/dev-uas.c
@@ -653,7 +653,8 @@ static void usb_uas_handle_control(USBDevice *dev, USBPacket *p,
if (ret >= 0) {
return;
}
- error_report("%s: unhandled control request", __func__);
+ error_report("%s: unhandled control request (req 0x%x, val 0x%x, idx 0x%x",
+ __func__, request, value, index);
p->status = USB_RET_STALL;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] [PATCH 2/2] usb: accept usb3 control requests
2017-01-31 13:52 [Qemu-devel] [PATCH 1/2] usb/uas: more verbose error message Gerd Hoffmann
@ 2017-01-31 13:52 ` Gerd Hoffmann
0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2017-01-31 13:52 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Windows 10 reportedly sends these, so accept them in case
the device in question is a superspeed (usb3) device.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
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 847c9de..6fb62b2 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-31 13:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-31 13:52 [Qemu-devel] [PATCH 1/2] usb/uas: more verbose error message Gerd Hoffmann
2017-01-31 13:52 ` [Qemu-devel] [PATCH 2/2] usb: accept usb3 control requests Gerd Hoffmann
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).