summaryrefslogtreecommitdiff
path: root/hw/usb/redirect.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-12-14 14:35:44 +0100
committerGerd Hoffmann <kraxel@redhat.com>2013-01-07 12:57:24 +0100
commitd3aea641a4002e0abe940c65d318ef38eda245df (patch)
tree32897476b5cbc0b6e997bb3e4a45e9e6cb6f24f3 /hw/usb/redirect.c
parentd8553dd0475a967042193cdcf4d02c8ce5e73730 (diff)
downloadqemu-d3aea641a4002e0abe940c65d318ef38eda245df.tar.gz
usbredir: Verify we have 32 bits bulk length cap when redirecting to xhci
The xhci-hcd may submit bulk transfers > 65535 bytes even when not using bulk-in pipeling, so usbredir can only be used in combination with an xhci hcd if the client has the 32 bits bulk length capability. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/redirect.c')
-rw-r--r--hw/usb/redirect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 855c76563a..566737d8f5 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -980,6 +980,8 @@ static void usbredir_do_attach(void *opaque)
usbredirparser_peer_has_cap(dev->parser,
usb_redir_cap_ep_info_max_packet_size) &&
usbredirparser_peer_has_cap(dev->parser,
+ usb_redir_cap_32bits_bulk_length) &&
+ usbredirparser_peer_has_cap(dev->parser,
usb_redir_cap_64bits_ids))) {
ERROR("usb-redir-host lacks capabilities needed for use with XHCI\n");
usbredir_reject_device(dev);