• Carl-Daniel Hailfinger's avatar
    ft2232_spi: add some error handling · a2441cef
    Carl-Daniel Hailfinger authored
    
    
    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: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
    Acked-by: default avatarPaul Fox <pgf@laptop.org>
    a2441cef
ft2232_spi.c 7.83 KB