From patchwork Fri Dec 14 13:35:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [23/26] usbredir: Verify we have 32 bits bulk length cap when redirecting to xhci Date: Fri, 14 Dec 2012 03:35:44 -0000 From: Hans de Goede X-Patchwork-Id: 206466 Message-Id: <1355492147-5023-24-git-send-email-hdegoede@redhat.com> To: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org 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 --- hw/usb/redirect.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index ed2f427..f4715f3 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -989,6 +989,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);