From: Wolfram Sang <wsa@kernel.org>
To: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Cc: Peter Korsgaard <peter@korsgaard.com>,
Andrew Lunn <andrew@lunn.ch>,
Federico Vaga <federico.vaga@cern.ch>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
linux@ew.tq-group.com,
Gregor Herburger <gregor.herburger@tq-group.com>
Subject: Re: [PATCH v2] i2c: ocores: generate stop condition after timeout in polling mode
Date: Thu, 13 Apr 2023 18:33:39 +0200 [thread overview]
Message-ID: <ZDgu45b/tN4On+8o@sai> (raw)
In-Reply-To: <20230413093737.15303-1-matthias.schiffer@ew.tq-group.com>
[-- Attachment #1: Type: text/plain, Size: 920 bytes --]
On Thu, Apr 13, 2023 at 11:37:37AM +0200, Matthias Schiffer wrote:
> From: Gregor Herburger <gregor.herburger@tq-group.com>
>
> In polling mode, no stop condition is generated after a timeout. This
> causes SCL to remain low and thereby block the bus. If this happens
> during a transfer it can cause slaves to misinterpret the subsequent
> transfer and return wrong values.
>
> To solve this, pass the ETIMEDOUT error up from ocores_process_polling()
> instead of setting STATE_ERROR directly. The caller is adjusted to call
> ocores_process_timeout() on error both in polling and in IRQ mode, which
> will set STATE_ERROR and generate a stop condition.
>
> Fixes: 69c8c0c0efa8 ("i2c: ocores: add polling interface")
> Signed-off-by: Gregor Herburger <gregor.herburger@tq-group.com>
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Applied to for-current, thanks everyone!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2023-04-13 16:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 9:37 [PATCH v2] i2c: ocores: generate stop condition after timeout in polling mode Matthias Schiffer
2023-04-13 9:58 ` Peter Korsgaard
2023-04-13 11:54 ` Andrew Lunn
2023-04-13 14:05 ` Federico Vaga
2023-04-13 16:33 ` 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=ZDgu45b/tN4On+8o@sai \
--to=wsa@kernel.org \
--cc=andrew@lunn.ch \
--cc=federico.vaga@cern.ch \
--cc=gregor.herburger@tq-group.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@ew.tq-group.com \
--cc=matthias.schiffer@ew.tq-group.com \
--cc=peter@korsgaard.com \
/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