]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: tegra: Wait for config load atomically while in ISR
authorMikko Perttunen <mperttunen@nvidia.com>
Mon, 11 Jan 2021 16:08:32 +0000 (18:08 +0200)
committerWolfram Sang <wsa@kernel.org>
Mon, 11 Jan 2021 21:38:22 +0000 (22:38 +0100)
commitc5c0fc6259540a2f1ce552711345e15ecda288b4
treeb159892cc68e17e7b6a4cf89e6da2d5b89d83cda
parent23a2b9809c00c14636d193186909bff30026c39d
i2c: tegra: Wait for config load atomically while in ISR

Upon a communication error, the interrupt handler can call
tegra_i2c_disable_packet_mode. This causes a sleeping poll to happen
unless the current transaction was marked atomic. Fix this by
making the poll happen atomically if we are in an IRQ.

This matches the behavior prior to the patch mentioned
in the Fixes tag.

Fixes: 15046b937146 ("i2c: tegra: Support atomic transfers")
Cc: stable@vger.kernel.org
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-tegra.c