<div class="gmail_quote">On Mon, Apr 25, 2011 at 5:53 PM, Carl-Daniel Hailfinger <span dir="ltr"><<a href="mailto:c-d.hailfinger.devel.2006@gmx.net">c-d.hailfinger.devel.2006@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi,<br>
<br>
Am <a href="tel:26.04.2011%2000" value="+12604201100" target="_blank">26.04.2011 00</a>:43 schrieb David Hendricks:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm using Flashrom with an FTDI FT4232H to read a 1MB SPI ROM (w25q80), but<br>
am encountering difficulties. I believe we may be missing some steps in<br>
ft2232_spi_init(), however I don't have much experience with libftdi or usb<br>
debugging so I hope someone on the list does :-)<br>
<br>
When the programmer is plugged into a "full-speed" USB port slow, things<br>
seem to work well. However, when plugged into a "high-speed" port, bytes<br>
simply disappear. There does not seem to be a pattern with regard to where<br>
the problems start. Sometimes it will fail very early and Flashrom will not<br>
be able to detect the chip. Sometimes we'll get lucky and we can read the<br>
full chip. It can fail anywhere in between.<br>
<br>
The only pattern I've seen is that usb bulk reads return less than the<br>
requested number of bytes before it fails entirely. For example, if we<br>
request 256 bytes, then it might return 256-N data bytes. libftdi will<br>
request the remaining bytes, and libusb will provide the remaining N data<br>
bytes. On the next 256-byte request, libusb will not return any data bytes<br>
(only the 2-byte USB header).<br>
   <br>
</blockquote>
<br></div>
This is a known problem which may happen with older (>6 months) libftdi and/or older kernels (>6 months) and/or older libusb. The libftdi mailing list probably has more information. If you can reproduce the issue with a recent kernel (2.6.36 or newer) and recent libusb and libftdi from git, please tell the libftdi mailing list.<br>


IIRC some flashrom patch (sent in the last 6 months or so) tried to make sure that such issues are worked around in flashrom by requiring recent libftdi and by setting a parameter which reduces the likelihood of that event. Sorry, I don't have more details handy right now.</blockquote>

<div><br></div><div>Quick follow up -- I got a chance to try flashrom out with the <meta http-equiv="content-type" content="text/html; charset=utf-8">FT4232H out on machine with a 2.6.38 kernel and it worked great, EHCI high speed and all :-)</div>

<div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">Thanks for the pointer!</div><div><br></div></div>-- <br>David Hendricks (dhendrix)<br>Systems Software Engineer, Google Inc.<br>