From f0cb57d4cf98100529c945f92923acd60f9d9ed8 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 7 Sep 2012 14:02:35 +0200 Subject: [PATCH] Update to upstream 0.5 release --- .gitignore | 1 + ...on-t-set-a-timeout-on-bulk-transfers.patch | 47 ------------------- ...perly-log-an-error-when-the-initial-.patch | 36 -------------- sources | 2 +- usbredir.spec | 11 ++--- 5 files changed, 7 insertions(+), 90 deletions(-) delete mode 100644 0001-usbredirhost-Don-t-set-a-timeout-on-bulk-transfers.patch delete mode 100644 0002-usbredirhost-Properly-log-an-error-when-the-initial-.patch diff --git a/.gitignore b/.gitignore index 410898e..7b7b5e4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /usbredir-0.4.1.tar.bz2 /usbredir-0.4.2.tar.bz2 /usbredir-0.4.3.tar.bz2 +/usbredir-0.5.tar.bz2 diff --git a/0001-usbredirhost-Don-t-set-a-timeout-on-bulk-transfers.patch b/0001-usbredirhost-Don-t-set-a-timeout-on-bulk-transfers.patch deleted file mode 100644 index f0c210d..0000000 --- a/0001-usbredirhost-Don-t-set-a-timeout-on-bulk-transfers.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 7783d3db61083bbf7f61b1ea8608c666b4c6a1dd Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Fri, 22 Jun 2012 11:48:37 +0200 -Subject: [PATCH 1/5] usbredirhost: Don't set a timeout on bulk transfers - -Bulk packets can be (ab)used as interrupt transfers without timing guarantees, -iow you can submit a bulk in transfer and let it be submitted until the -device has data to reports a few eons later. - -This is used by (some?) USB cdc-acm devices (modems, smartcard readers, gps -devices), specifically a smartcard reader I've been debugging, which currently -does not work. - -Not setting a timeout at the usb-host side fixes these devices. For devices -where timeouts do make sense, the timeouts should be handled by the usb-guest, -which has device specific knowledge we lack. - -Signed-off-by: Hans de Goede ---- - usbredirhost/usbredirhost.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/usbredirhost/usbredirhost.c b/usbredirhost/usbredirhost.c -index 8b0c1ba..be75f87 100644 ---- a/usbredirhost/usbredirhost.c -+++ b/usbredirhost/usbredirhost.c -@@ -31,7 +31,7 @@ - #define MAX_ENDPOINTS 32 - #define MAX_INTERFACES 32 /* Max 32 endpoints and thus interfaces */ - #define CTRL_TIMEOUT 5000 /* USB specifies a 5 second max timeout */ --#define BULK_TIMEOUT 5000 -+#define BULK_TIMEOUT 0 /* No timeout for bulk transfers */ - #define ISO_TIMEOUT 1000 - #define INTERRUPT_TIMEOUT 0 /* No timeout for interrupt transfers */ - -@@ -2017,7 +2017,7 @@ static void usbredirhost_bulk_packet(void *priv, uint32_t id, - libusb_fill_bulk_transfer(transfer->transfer, host->handle, ep, - data, bulk_packet->length, - usbredirhost_bulk_packet_complete, -- transfer, CTRL_TIMEOUT); -+ transfer, BULK_TIMEOUT); - transfer->id = id; - transfer->bulk_packet = *bulk_packet; - --- -1.7.11.2 - diff --git a/0002-usbredirhost-Properly-log-an-error-when-the-initial-.patch b/0002-usbredirhost-Properly-log-an-error-when-the-initial-.patch deleted file mode 100644 index 944ecb6..0000000 --- a/0002-usbredirhost-Properly-log-an-error-when-the-initial-.patch +++ /dev/null @@ -1,36 +0,0 @@ -From cb74b3113076d6e18c799a0c73978e1aea32bad0 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Fri, 6 Jul 2012 14:25:48 +0200 -Subject: [PATCH 2/5] usbredirhost: Properly log an error when the initial - device reset fails - -Signed-off-by: Hans de Goede ---- - TODO | 1 + - usbredirhost/usbredirhost.c | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/TODO b/TODO -index e6715b1..2085006 100644 ---- a/TODO -+++ b/TODO -@@ -4,3 +4,4 @@ - * cancel pending packets / active streams before reset? - * add a queue_buf call to parser, use it in host to avoid memcpy of - "in" bulk transfers -+* use libusb strerror equivalent instead of numeric error codes in logs -diff --git a/usbredirhost/usbredirhost.c b/usbredirhost/usbredirhost.c -index be75f87..2415c26 100644 ---- a/usbredirhost/usbredirhost.c -+++ b/usbredirhost/usbredirhost.c -@@ -707,6 +707,7 @@ int usbredirhost_set_device(struct usbredirhost *host, - so lets do that before hand */ - r = libusb_reset_device(host->handle); - if (r != 0) { -+ ERROR("resetting device: %d", r); - usbredirhost_clear_device(host); - return libusb_status_or_error_to_redir_status(host, r); - } --- -1.7.11.2 - diff --git a/sources b/sources index e636d64..ff5d633 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -98464d74f867ded3bcab0078666d621f usbredir-0.4.3.tar.bz2 +b7e9807edb87ccaf361a53eb5d6a4a1b usbredir-0.5.tar.bz2 diff --git a/usbredir.spec b/usbredir.spec index e124222..40da6e6 100644 --- a/usbredir.spec +++ b/usbredir.spec @@ -1,13 +1,11 @@ Name: usbredir -Version: 0.4.3 -Release: 3%{?dist} +Version: 0.5 +Release: 1%{?dist} Summary: USB network redirection protocol libraries Group: System Environment/Libraries License: LGPLv2+ URL: http://spice-space.org/page/UsbRedir Source0: http://spice-space.org/download/%{name}/%{name}-%{version}.tar.bz2 -Patch1: 0001-usbredirhost-Don-t-set-a-timeout-on-bulk-transfers.patch -Patch2: 0002-usbredirhost-Properly-log-an-error-when-the-initial-.patch BuildRequires: libusb1-devel >= 1.0.9 %description @@ -47,8 +45,6 @@ A simple USB host TCP server, using libusbredirhost. %prep %setup -q -%patch1 -p1 -%patch2 -p1 %build @@ -82,6 +78,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/libusbredir*.la %changelog +* Fri Sep 7 2012 Hans de Goede - 0.5-1 +- Update to upstream 0.5 release + * Mon Jul 30 2012 Hans de Goede - 0.4.3-3 - Add 2 fixes from upstream fixing issues with some bulk devices (rhbz#842358)