LIBUSB_ERROR_OVERFLOW even when transfer buffer size is a multiple of the endpoint's packet size
Hi all. I don't know in whose area of liability this lies, so I'm writing this to both libusb and libftdi MLs.
Long story short, I'm trying to get a stream of data from an FT2232H and I get a LIBUSB_ERROR_OVERFLOW. (Actually, what I get is an "unknown status 6" string to my stderr, which is defined in ftdi_stream.c:109).
This error is present when using both ftdi_readstream and ftdi_read_data.
The reason why I am writing this letter is that the libusb documentation says this:
>you will never see an overflow if your transfer buffer size is a multiple of the endpoint's packet size
...and this is exactly what libftdi does:
int bufferSize = packetsPerTransfer * ftdi->max_packet_size; (ftdi_stream.c:153)
I checked, and the max_packet_size field is populated correctly (as far as lsusb can tell): the chip declares the endpoint's packet size as 512 bytes, and this is what max_packet_size equals to.