ft2232_spi: add some error handling

Pretty much everybody who used the FT2232 SPI driver had problems with
incorrect reads from time to time. One reason was that the hardware is
pretty timing sensitive even for reads.

The other reason was that the code silently ignored errors. This patch
doesn't add any error recovery, but it will emit error messages if
FT2232 communication goes wrong. That allows us to track down errors
without investing hours in driver debugging.

Thanks to Jeremy Buseman <naviathan@gmail.com> for testing. He found out
that certain libftdi/libusb/kernel/hardware combinations drop some bytes
without returning any error codes.

Corresponding to flashrom svn r769.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Paul Fox <pgf@laptop.org>
1 file changed