[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9ba3d704-674b-94df-d10f-e3edb3c695d6@kapsi.fi>
Date: Mon, 11 Jan 2021 16:38:06 +0200
From: Mikko Perttunen <cyndis@...si.fi>
To: David Laight <David.Laight@...LAB.COM>,
'Mikko Perttunen' <mperttunen@...dia.com>,
"ldewangan@...dia.com" <ldewangan@...dia.com>,
"digetx@...il.com" <digetx@...il.com>,
"thierry.reding@...il.com" <thierry.reding@...il.com>,
"jonathanh@...dia.com" <jonathanh@...dia.com>,
"wsa@...nel.org" <wsa@...nel.org>
Cc: "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] i2c: tegra: Wait for config load atomically while in ISR
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 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 the interrupt path,
>> make it use atomic waiting always.
>
> Spin-waiting in an ISR for anything that it makes sense to do
> a sleep-wait for at other times is badly broken design.
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>
Powered by blists - more mailing lists