libftdi Archives

Subject: [libftdi-1.0] Limit read buffer chunksize to 16384 on Linux

From: Jie Zhang <jzhang918@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sun, 14 Feb 2010 09:16:10 +0800
We can't set readbuffer_chunksize larger than MAX_BULK_BUFFER_LENGTH,
which is defined in libusb-1.0, on Linux. Otherwise, each USB read
request will be divided into multiple (to be exactly, 4) URBs. The
last 3 URBs of these 4 URBs will usually result in abnormal reaps
because we usually request small number of data. The abnormal reaps
will concatenate empty ftdi packets to other packet on Linux kernel
older than 2.6.32. libftdi cannot parse such combined packet. This
will cause issue for UrJTAG when using libftdi-1.0 with libusb-1.0. I
have committed this patch on the libftdi-1.0 git tree.


Jie


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Attachment: libftdi-limit-read-chunksize-to-16KB.diff
Description: Text Data

Current Thread