From: Mikko Perttunen <cyndis@kapsi.fi>
To: David Laight <David.Laight@ACULAB.COM>,
'Mikko Perttunen' <mperttunen@nvidia.com>,
"ldewangan@nvidia.com" <ldewangan@nvidia.com>,
"digetx@gmail.com" <digetx@gmail.com>,
"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
"jonathanh@nvidia.com" <jonathanh@nvidia.com>,
"wsa@kernel.org" <wsa@kernel.org>
Cc: "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] i2c: tegra: Wait for config load atomically while in ISR
Date: Mon, 11 Jan 2021 16:38:06 +0200 [thread overview]
Message-ID: <9ba3d704-674b-94df-d10f-e3edb3c695d6@kapsi.fi> (raw)
In-Reply-To: <a0b0f224c2864b80a5bac53646d67daf@AcuMS.aculab.com>
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)
>
next prev parent reply other threads:[~2021-01-11 14:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 13:55 [PATCH] i2c: tegra: Wait for config load atomically while in ISR Mikko Perttunen
2021-01-11 14:31 ` David Laight
2021-01-11 14:38 ` Mikko Perttunen [this message]
2021-01-11 15:14 ` Dmitry Osipenko
2021-01-11 15:52 ` Mikko Perttunen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9ba3d704-674b-94df-d10f-e3edb3c695d6@kapsi.fi \
--to=cyndis@kapsi.fi \
--cc=David.Laight@ACULAB.COM \
--cc=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mperttunen@nvidia.com \
--cc=stable@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox