[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 26/31] usb-redir: Add support for 32 bits bulk packe
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 26/31] usb-redir: Add support for 32 bits bulk packet length |
Date: |
Thu, 1 Nov 2012 16:54:39 +0100 |
From: Hans de Goede <address@hidden>
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
configure | 2 +-
hw/usb/redirect.c | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 9c6ac87..fbebf0f 100755
--- a/configure
+++ b/configure
@@ -2755,7 +2755,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 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",
--
1.7.1
- [Qemu-devel] [PATCH 10/31] usb/ehci: Abstract away PCI DMA API, (continued)
- [Qemu-devel] [PATCH 10/31] usb/ehci: Abstract away PCI DMA API, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 07/31] xhci: add port trace points, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 09/31] usb/ehci: parameterise the register region offsets, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 20/31] usb/ehci-pci: add ich9 00:1a.* variant, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 02/31] xhci: s/xhci_update_port/xhci_port_update/, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 21/31] usb/ehci-pci: add helper to create ich9 usb controllers, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 11/31] usb/ehci: seperate out PCIisms, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 29/31] usb-redir: Use reject rather the disconnect on bad ep info, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 01/31] xhci: add {get, set}_field macros & enum for pls, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 18/31] uhci: add ich9 00:1a.* variants, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 26/31] usb-redir: Add support for 32 bits bulk packet length,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 28/31] usb-redir: Add an usbredir_setup_usb_eps() helper function, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 05/31] xhci: add xhci_port_reset, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 12/31] usb/ehci: Guard definition of EHCI_DEBUG, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 16/31] uhci: dynamic type generation, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 31/31] usb-redir: Allow redirecting super speed devices to high speed controllers, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 30/31] usb-redir: Allow to attach USB 2.0 devices to 1.1 host controller, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 24/31] usb: Add packet combining functions, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 14/31] usb/ehci: add sysbus variant, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 22/31] uhci: Add a uhci_handle_td_error() helper function, Gerd Hoffmann, 2012/11/01
- [Qemu-devel] [PATCH 27/31] usb-redir: Add support for input pipelining, Gerd Hoffmann, 2012/11/01