OSDN Git Service

usbredir: Verify we have 32 bits bulk length cap when redirecting to xhci
authorHans de Goede <hdegoede@redhat.com>
Fri, 14 Dec 2012 13:35:44 +0000 (14:35 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 7 Jan 2013 11:57:24 +0000 (12:57 +0100)
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>
hw/usb/redirect.c

index 855c765..566737d 100644 (file)
@@ -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);