From: "Ondřej Jirman" <megous@megous.com>
To: Wolfram Sang <wsa@kernel.org>, Heiko Stuebner <heiko@sntech.de>,
Krzysztof Kozlowski <krzk@kernel.org>,
"moderated list:ARM/Rockchip SoC support"
<linux-arm-kernel@lists.infradead.org>,
"open list:ARM/Rockchip SoC support"
<linux-rockchip@lists.infradead.org>,
"open list:I2C SUBSYSTEM HOST DRIVERS"
<linux-i2c@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [RESEND PATCH] i2c: rk3x: Handle a spurious start completion interrupt flag
Date: Tue, 30 Nov 2021 16:54:43 +0100 [thread overview]
Message-ID: <20211130155443.sbvpirzj6moikxl2@core> (raw)
In-Reply-To: <YaSfZxtYtV+SfJqL@kunai>
On Mon, Nov 29, 2021 at 10:37:43AM +0100, Wolfram Sang wrote:
>
> > This causes I2C transfer being aborted in polled mode from a stop completion
> > handler:
>
> I wonder why this only happens in polling mode? The question behind that
> is: is it really a spurious irq from the HW or is it maybe a race in the
> driver? Because polling uses the same interrupt handler but just
> periodically polls it.
Spurious interupt happens in both modes.
Abort only happens in polled mode, becase polling executes the irq handler
before the stop condition interrupt fires. In that case rk3x_i2c_irq will
execute rk3x_i2c_handle_stop, which will terminate the transfer, becasuse
it's executed without STOP completion interrupt flag being set.
In interrupt mode, the interrupt handler alwyas executes after the stop
condition, so the spurious START interrupt is ignored in this case.
kind regards,
o.
next prev parent reply other threads:[~2021-11-30 16:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-24 11:15 [RESEND PATCH] i2c: rk3x: Handle a spurious start completion interrupt flag Ondrej Jirman
2021-11-18 18:37 ` John Keeping
2021-11-29 9:37 ` Wolfram Sang
2021-11-30 15:54 ` Ondřej Jirman [this message]
2021-11-30 21:36 ` Wolfram Sang
2021-11-30 21:37 ` Wolfram Sang
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=20211130155443.sbvpirzj6moikxl2@core \
--to=megous@megous.com \
--cc=heiko@sntech.de \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--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;
as well as URLs for NNTP newsgroup(s).