Re: Bug#310365: libusb timeout, patch
On Tue, May 24, 2005 at 12:40:33PM +0200, Julien BLACHE wrote:
> Aurelien Jarno <aurelien@aurel32.net> wrote:
>
> > I would prefer I change in SANE instead of libusb, so that other
> > applications using libusb won't suffer to performance losses.
>
> I strongly disagree. I know what I'm losing with libsane as it is
> today, I don't know what I'm going to lose with this hackish patch.
Ok, so let's go with a modified version of libusb.
For the release managers, I have uploaded a fixed version of libusb to
testing-proposed-updates. Here are the changes:
diff -u libusb-0.1.10a/linux.c libusb-0.1.10a/linux.c
--- libusb-0.1.10a/linux.c
+++ libusb-0.1.10a/linux.c
@@ -132,7 +132,7 @@
* Linux usbfs has a limit of 16KB for the URB interface. We use this now
* to get better performance for USB 2.0 devices.
*/
-#define MAX_READ_WRITE (16 * 1024)
+#define MAX_READ_WRITE (4 * 1024)
int usb_control_msg(usb_dev_handle *dev, int requesttype, int request,
int value, int index, char *bytes, int size, int timeout)
>
> And wrt performances, <insert comment about Gentoo here> ;)
My tests show me an improvement of 7% with some USB 1.1 devices and 19%
for some USB 2.0 devices. I don't found that insignificant.
Bye,
Aurelien
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian GNU/Linux developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
Reply to: