diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-10-31 13:47:11 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-11-01 15:17:58 +0100 |
commit | c19a798133e936a15ee0175ebc973d777c4c62ed (patch) | |
tree | d5246963eb1d8b91529a2439b1b6f685a7a7685a /hw/usb/redirect.c | |
parent | 579967bea69bf1b32faee13ff76b19ba641a2618 (diff) | |
download | qemu-c19a798133e936a15ee0175ebc973d777c4c62ed.zip qemu-c19a798133e936a15ee0175ebc973d777c4c62ed.tar.gz qemu-c19a798133e936a15ee0175ebc973d777c4c62ed.tar.bz2 |
usb-redir: Add support for 32 bits bulk packet length
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.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 22f671b..6008620 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -575,6 +575,10 @@ static int usbredir_handle_bulk_data(USBRedirDevice *dev, USBPacket *p, bulk_packet.endpoint = ep; bulk_packet.length = p->iov.size; bulk_packet.stream_id = 0; + bulk_packet.length_high = p->iov.size >> 16; + assert(bulk_packet.length_high == 0 || + usbredirparser_peer_has_cap(dev->parser, + usb_redir_cap_32bits_bulk_length)); if (ep & USB_DIR_IN) { usbredirparser_send_bulk_packet(dev->parser, p->id, @@ -896,6 +900,7 @@ static void usbredir_create_parser(USBRedirDevice *dev) usbredirparser_caps_set_cap(caps, usb_redir_cap_filter); usbredirparser_caps_set_cap(caps, usb_redir_cap_ep_info_max_packet_size); usbredirparser_caps_set_cap(caps, usb_redir_cap_64bits_ids); + usbredirparser_caps_set_cap(caps, usb_redir_cap_32bits_bulk_length); if (runstate_check(RUN_STATE_INMIGRATE)) { flags |= usbredirparser_fl_no_hello; @@ -1452,7 +1457,7 @@ static void usbredir_bulk_packet(void *priv, uint64_t id, { USBRedirDevice *dev = priv; uint8_t ep = bulk_packet->endpoint; - int len = bulk_packet->length; + int len = (bulk_packet->length_high << 16) | bulk_packet->length; USBPacket *p; DPRINTF("bulk-in status %d ep %02X len %d id %"PRIu64"\n", |