Hello Jim,
On Tuesday, 10. November 2009 22:10:10 Jim Paris wrote:
> > Now we just need a fix for the
> >
> > "FT2232H bug: wrong maxpacket at full speed"
> >
> > issue ;)
>
> Probably something like the below patch. Note, only lightly tested
> (it returns 64 on my full-speed device here), and maybe it's something
> that should instead be stored in ftdi_context every time the interface
> changes.
Thanks for the code! I wanted to cook up a small example program
to send to the list - now I can concentrate on integrating this :)
Storing the value inside the ftdi_context is a good idea. Also we need some
more safety checks for NULL pointers as dev->config might be missing:
http://developer.intra2net.com/git/?p=libftdi;a=commitdiff;h=a56ba2bd557e7c7804b288aee2dcc42c8037b03c
Maybe some fallback value to 512 / 64 is nice, too, if the config descriptor
is not present or contains a bogus value (like zero).
Cheers,
Thomas
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|