[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 17/22] usb-redir: Add support for 32 bits bulk packe
From: |
Hans de Goede |
Subject: |
[Qemu-devel] [PATCH 17/22] usb-redir: Add support for 32 bits bulk packet length |
Date: |
Mon, 15 Oct 2012 12:38:26 +0200 |
Signed-off-by: Hans de Goede <address@hidden>
---
configure | 2 +-
hw/usb/redirect.c | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 248b871..036c38a 100755
--- a/configure
+++ b/configure
@@ -2768,7 +2768,7 @@ fi
# check for usbredirparser for usb network redirection support
if test "$usb_redir" != "no" ; then
- if $pkg_config --atleast-version=0.5 libusbredirparser-0.5 >/dev/null 2>&1
; then
+ if $pkg_config --atleast-version=0.5.3 libusbredirparser-0.5 >/dev/null
2>&1 ; then
usb_redir="yes"
usb_redir_cflags=$($pkg_config --cflags libusbredirparser-0.5
2>/dev/null)
usb_redir_libs=$($pkg_config --libs libusbredirparser-0.5 2>/dev/null)
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 99e25d4..030522e 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -585,6 +585,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,
@@ -906,6 +910,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;
@@ -1479,7 +1484,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",
--
1.7.12.1
- [Qemu-devel] [PATCH 04/22] ehci: Set int flag on a short input packet, (continued)
- [Qemu-devel] [PATCH 04/22] ehci: Set int flag on a short input packet, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 07/22] ehci: Detect going in circles when filling the queue, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 08/22] xhci: Add a xhci_ep_nuke_one_xfer helper function, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 05/22] ehci: Improve latency of interrupt delivery and async schedule scanning, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 10/22] usb: Add USB_RET_ADD_TO_QUEUE packet result code, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 09/22] usb: Rename __usb_packet_complete to usb_packet_complete_one, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 13/22] usb: Add an int_req flag to USBPacket, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 16/22] usb-redir: When a packet contains data on a stall, ignore the stall, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 17/22] usb-redir: Add support for 32 bits bulk packet length,
Hans de Goede <=
- [Qemu-devel] [PATCH 12/22] usb: Move short-not-ok handling to the core, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 11/22] usb: Move clearing of queue on halt to the core, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 15/22] combined-packet: Add a workaround for Linux usbfs + live migration, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 14/22] usb: Add packet combining functions, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 22/22] usb-redir: Allow redirecting super speed devices to high speed controllers, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 20/22] usb-redir: Use reject rather the disconnect on bad ep info, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 18/22] usb-redir: Add support for input pipelining, Hans de Goede, 2012/10/15