Skip to content
Commit 96219c3a authored by Doug Anderson's avatar Doug Anderson Committed by Ben Dooks
Browse files

i2c-tegra: fix possible race condition after tx



In tegra_i2c_fill_tx_fifo, once we have finished pushing all the bytes
to the I2C hardware controller, the interrupt might happen before we
have updated i2c_dev->msg_buf_remaining at the end of the function.
Then, in tegra_i2c_isr, we will call again tegra_i2c_fill_tx_fifo
triggering weird behaviour. This has been shown to happen under real
conditions.

Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
Tested-by: default avatarVincent Palatin <vpalatin@chromium.org>
Acked-by: default avatarRhyland Klein <rklein@nvidia.com>
Acked-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent 048e29cf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment