libftdi Archives

Subject: Re: ftdi_write_data unstable on 2.6 Works perfect on 2.4

From: Nathan Fraser <ndf@xxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 31 Jul 2009 17:45:41 +1000
Hi guys,

I've had the "first write" problem too... I think it might be a
timeout happening in the libusb bulk transfer. Hard to confirm since
it appears to happen almost at random, but since increasing the ftdi
timeout I've not seen the first write fail.

This and some other issues got me looking into libusb to figure out
what was happening and what it does on a bulk transfer is poll the usb
subsystem every ~1ms for completion of the command. If the system time
after each check is beyond some time specified by the timeout, it
aborts the command and returns.

Try increasing the ftdi timeout value, and see if that helps - if so
perhaps we are on the way to tracking down the problem.

libusb1 appears to improve the way blocking bulk transfers are done,
and maybe use of that might help to mitigate these problems. (/looking
into it)

Nath.

2009/7/31 Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>:
> IIRC our upgrade from kernel 2.4 to kernel 2.6 was done without
> a singel libftdi/libusb change and it stopped working.
> So either it's a libusb or a kernel issue I guess.
>
> My experience is that sometimes the first write() call gets lost.
> Besides that it's stable. Though it doesn't always happen :-(

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

Current Thread