Re: [PATCH] i2c: tegra: Wait for config load atomically while in ISR

2021-01-11 Thread Mikko Perttunen
On 1/11/21 5:14 PM, Dmitry Osipenko wrote: 11.01.2021 16:55, Mikko Perttunen пишет: 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. Since

Re: [PATCH] i2c: tegra: Wait for config load atomically while in ISR

2021-01-11 Thread Dmitry Osipenko
11.01.2021 16:55, Mikko Perttunen пишет: > 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. Since > tegra_i2c_disable_packet_mode is only called from the interrupt

Re: [PATCH] i2c: tegra: Wait for config load atomically while in ISR

2021-01-11 Thread Mikko Perttunen
Agreed that this is possibly not optimal, but this patch simply returns the behavior to what it was before "i2c: tegra: Support atomic transfers", fixing the overt issue. Design fixes can be considered later, in a non-stable patch. Mikko On 1/11/21 4:31 PM, David Laight wrote: From: Mikko

RE: [PATCH] i2c: tegra: Wait for config load atomically while in ISR

2021-01-11 Thread David Laight
From: Mikko Perttunen > Sent: 11 January 2021 13:56 > > 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. Since > tegra_i2c_disable_packet_mode is only called from

[PATCH] i2c: tegra: Wait for config load atomically while in ISR

2021-01-11 Thread Mikko Perttunen
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. Since tegra_i2c_disable_packet_mode is only called from the interrupt path, make it use atomic waiting always. Fixes: