• Carl-Daniel Hailfinger's avatar
    Add paranoid checks to sb600spi driver · eb0e7fc4
    Carl-Daniel Hailfinger authored
    
    Add paranoid checks for correct values in essential registers in the SB600/SB700/... SPI driver. If something else changes the values we
    wrote, we will see severe read/write corruption.
    sb600spi will now abort the access and return an error if it detects
    this sort of corruption.
    
    Note: This corruption can be caused by a few different events:
    - IPMI/BMC/IMC accesses flash
    - Other software accesses flash
    The nature of flash access (read/write/ID/...) is irrelevant. Each such
    access will cause corruption for all other accesses happening at the
    same time.
    
    Thanks to Matthias Kretz for testing this patch.
    
    Corresponding to flashrom svn r1145.
    Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
    Acked-by: default avatarMatthias Kretz <kretz@kde.org>
    eb0e7fc4
spi.h 3.59 KB