• George Cherian's avatar
    i2c: xlp9xx: Fix case where SSIF read transaction completes early · 5eb173f5
    George Cherian authored
    During ipmi stress tests we see occasional failure of transactions
    at the boot time. This happens in the case of a I2C_M_RECV_LEN
    transactions, when the read transfer completes (with the initial
    read length of 34) before the driver gets a chance to handle interrupts.
    
    The current driver code expects at least 2 interrupts for I2C_M_RECV_LEN
    transactions. The length is updated during the first interrupt, and  the
    buffer contents are only copied during subsequent interrupts. In case of
    just one interrupt, we will complete the transaction without copying
    out the bytes from RX fifo.
    
    Update the code to drain the RX fifo after the length update,
    so that the transaction completes correctly in all cases.
    Signed-off-by: default avatarGeorge Cherian <george.cherian@cavium.com>
    Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
    Cc: stable@kernel.org
    5eb173f5
Name
Last commit
Last update
..
algos Loading commit data...
busses Loading commit data...
muxes Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
i2c-boardinfo.c Loading commit data...
i2c-core-acpi.c Loading commit data...
i2c-core-base.c Loading commit data...
i2c-core-of.c Loading commit data...
i2c-core-slave.c Loading commit data...
i2c-core-smbus.c Loading commit data...
i2c-core.h Loading commit data...
i2c-dev.c Loading commit data...
i2c-mux.c Loading commit data...
i2c-slave-eeprom.c Loading commit data...
i2c-smbus.c Loading commit data...
i2c-stub.c Loading commit data...