From: Jan Glauber <jan.glauber@caviumnetworks.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
"Bazhenov, Dmitry" <dmitry.bazhenov@auriga.com>
Subject: Re: [PATCH 5/5] i2c: octeon,thunderx: Limit register access retries
Date: Thu, 22 Sep 2016 18:40:18 +0200 [thread overview]
Message-ID: <20160922164018.GA2993@hardcore> (raw)
In-Reply-To: <20160921210335.GG1513@katana>
On Wed, Sep 21, 2016 at 11:03:35PM +0200, Wolfram Sang wrote:
> On Wed, Sep 21, 2016 at 08:51:06AM +0200, Jan Glauber wrote:
> > Do not infinitely retry register readq and writeq operations
> > in order to not lock up the CPU in case the TWSI gets stuck.
> >
> > Return -EIO in case of a failed data read. For all other
> > cases just return so subsequent operations will fail
> > and trigger the recovery.
> >
> > Signed-off-by: Jan Glauber <jglauber@cavium.com>
>
> I didn't really check, but have you considered using
> readq_poll_timeout() from iopoll.h?
>
Indeed, readq_poll_timeout() fits quite well here. It will lose some cycles
on mips but I'm not convinced that matters with i2c.
That would be the first user of readq_poll_timeout() in the kernel :)
--Jan
prev parent reply other threads:[~2016-09-22 16:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 6:51 [PATCH 0/5] i2c: octeon,thunderx: Recovery fixes and improvements Jan Glauber
2016-09-21 6:51 ` [PATCH 1/5] i2c: octeon,thunderx: Fix set SCL recovery function Jan Glauber
2016-09-21 21:00 ` Wolfram Sang
2016-09-21 6:51 ` [PATCH 2/5] i2c: octeon,thunderx: Avoid sending STOP during recovery Jan Glauber
2016-09-21 21:00 ` Wolfram Sang
2016-09-21 6:51 ` [PATCH 3/5] i2c: octeon,thunderx: Fix high-level controller status check Jan Glauber
2016-09-21 21:01 ` Wolfram Sang
2016-09-21 6:51 ` [PATCH 4/5] i2c: octeon,thunderx: Check bus state before starting a transaction Jan Glauber
2016-09-21 20:55 ` Wolfram Sang
2016-09-22 16:08 ` Jan Glauber
2016-09-21 6:51 ` [PATCH 5/5] i2c: octeon,thunderx: Limit register access retries Jan Glauber
2016-09-21 21:03 ` Wolfram Sang
2016-09-22 16:40 ` Jan Glauber [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=20160922164018.GA2993@hardcore \
--to=jan.glauber@caviumnetworks.com \
--cc=dmitry.bazhenov@auriga.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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).