From: Wolfram Sang <wsa@the-dreams.de>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "Brendan Higgins" <brendanhiggins@google.com>,
"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
"Joel Stanley" <joel@jms.id.au>,
"Andrew Jeffery" <andrew@aj.id.au>,
linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org,
linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org,
"Cédric Le Goater" <clg@kaod.org>,
"Jae Hyun Yoo" <jae.hyun.yoo@linux.intel.com>
Subject: Re: [PATCH] i2c: aspeed: Acknowledge most interrupts early in interrupt handler
Date: Mon, 24 Sep 2018 23:45:23 +0200 [thread overview]
Message-ID: <20180924214523.GA18592@kunai> (raw)
In-Reply-To: <1536895810-28903-1-git-send-email-linux@roeck-us.net>
[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]
On Thu, Sep 13, 2018 at 08:30:10PM -0700, Guenter Roeck wrote:
> Commit 3e9efc3299dd ("i2c: aspeed: Handle master/slave combined irq events
> properly") moved interrupt acknowledgment to the end of the interrupt
> handler. In part this was done because the AST2500 datasheet says:
>
> I2CD10 Interrupt Status Register
> bit 2 Receive Done Interrupt status
> S/W needs to clear this status bit to allow next data receiving.
>
> Acknowledging Receive Done before receive data was handled resulted in
> receive errors on high speed I2C busses.
>
> However, interrupt acknowledgment was not only moved to the end of the
> interrupt handler for Receive Done Interrupt status, but for all interrupt
> status bits. This could result in race conditions if a second interrupt was
> received during interrupt handling and not handled but still acknowledged
> at the end of the interrupt handler.
>
> Acknowledge only "Receive Done Interrupt status" late in the interrupt
> handler to solve the problem.
>
> Fixes: 3e9efc3299dd ("i2c: aspeed: Handle master/slave combined irq events properly")
> Cc: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
> Cc: Joel Stanley <joel@jms.id.au>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-09-24 21:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-14 3:30 [PATCH] i2c: aspeed: Acknowledge most interrupts early in interrupt handler Guenter Roeck
2018-09-14 16:28 ` Jae Hyun Yoo
2018-09-17 16:34 ` Wolfram Sang
2018-09-17 17:16 ` Jae Hyun Yoo
2018-09-17 18:48 ` Guenter Roeck
2018-09-18 1:11 ` Joel Stanley
2018-09-18 1:28 ` Brendan Higgins
2018-09-24 21:45 ` Wolfram Sang [this message]
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=20180924214523.GA18592@kunai \
--to=wsa@the-dreams.de \
--cc=andrew@aj.id.au \
--cc=benh@kernel.crashing.org \
--cc=brendanhiggins@google.com \
--cc=clg@kaod.org \
--cc=jae.hyun.yoo@linux.intel.com \
--cc=joel@jms.id.au \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=openbmc@lists.ozlabs.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).