i2c: tegra: Fix possible race condition.
authorLaxman Dewangan <ldewangan@nvidia.com>
Wed, 7 Mar 2012 06:41:41 +0000 (11:41 +0530)
committerSimone Willett <swillett@nvidia.com>
Wed, 30 May 2012 17:09:19 +0000 (10:09 -0700)
commitecfc4f641d3bc4491170d6a5dd212ff587683bfa
tree433dae3936a3fcf79cd475a4ead8d035ad857c2f
parent58f7137049f6e7ad1d41fda34f68753de89bee39
i2c: tegra: Fix possible race condition.

on tegra3, the i2c communication start immediately
after writing the tx fifo. And hence there is possibility
to complete the transfer and generates done interrupt before
actually sw updates their local pointers/count.
This patch will make sure that pointers/count can
get updated before data written into the fifo.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/89510
(cherry picked from commit 999c09f0ed32f271e767a319dd094947e63fdb8c)

Change-Id: I8e974b83b5306ec3363d4ca31ce1b539a498ca08
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/99997
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
drivers/i2c/busses/i2c-tegra.c