Update to upstream 0.5 release
This commit is contained in:
parent
8cc5d916c4
commit
f0cb57d4cf
1
.gitignore
vendored
1
.gitignore
vendored
@ -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
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
From 7783d3db61083bbf7f61b1ea8608c666b4c6a1dd Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
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 <hdegoede@redhat.com>
|
||||
---
|
||||
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
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
From cb74b3113076d6e18c799a0c73978e1aea32bad0 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
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 <hdegoede@redhat.com>
|
||||
---
|
||||
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
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
98464d74f867ded3bcab0078666d621f usbredir-0.4.3.tar.bz2
|
||||
b7e9807edb87ccaf361a53eb5d6a4a1b usbredir-0.5.tar.bz2
|
||||
|
||||
@ -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 <hdegoede@redhat.com> - 0.5-1
|
||||
- Update to upstream 0.5 release
|
||||
|
||||
* Mon Jul 30 2012 Hans de Goede <hdegoede@redhat.com> - 0.4.3-3
|
||||
- Add 2 fixes from upstream fixing issues with some bulk devices (rhbz#842358)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user