From: Thierry Reding <thierry.reding@gmail.com>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>,
Shardar Shariff Md <smohammed@nvidia.com>,
linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] i2c: tegra: Fix NACK error handling
Date: Mon, 9 Jul 2018 16:01:56 +0200 [thread overview]
Message-ID: <20180709140156.GB18353@ulmo> (raw)
In-Reply-To: <1530608143-9222-1-git-send-email-jonathanh@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 1588 bytes --]
On Tue, Jul 03, 2018 at 09:55:43AM +0100, Jon Hunter wrote:
> On Tegra30 Cardhu the PCA9546 I2C mux is not ACK'ing I2C commands on
> resume from suspend (which is caused by the reset signal for the I2C
> mux not being configured correctl). However, this NACK is causing the
> Tegra30 to hang on resuming from suspend which is not expected as we
> detect NACKs and handle them. The hang observed appears to occur when
> resetting the I2C controller to recover from the NACK.
>
> Commit 77821b4678f9 ("i2c: tegra: proper handling of error cases") added
> additional error handling for some error cases including NACK, however,
> it appears that this change conflicts with an early fix by commit
> f70893d08338 ("i2c: tegra: Add delay before resetting the controller
> after NACK"). After commit 77821b4678f9 was made we now disable 'packet
> mode' before the delay from commit f70893d08338 happens. Testing shows
> that moving the delay to before disabling 'packet mode' fixes the hang
> observed on Tegra30. The delay was added to give the I2C controller
> chance to send a stop condition and so it makes sense to move this to
> before we disable packet mode. Please note that packet mode is always
> enabled for Tegra.
>
> Fixes: 77821b4678f9 ("i2c: tegra: proper handling of error cases")
>
> Cc: stable@vger.kernel.org
>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> drivers/i2c/busses/i2c-tegra.c | 17 ++++++++---------
> 1 file changed, 8 insertions(+), 9 deletions(-)
Seems sensible:
Acked-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-07-09 14:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 8:55 [PATCH] i2c: tegra: Fix NACK error handling Jon Hunter
2018-07-09 14:01 ` Thierry Reding [this message]
2018-07-09 22:20 ` 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=20180709140156.GB18353@ulmo \
--to=thierry.reding@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=smohammed@nvidia.com \
--cc=stable@vger.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).