From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-rockchip@lists.infradead.org,
linux-rpi-kernel@lists.infradead.org,
linux-tegra@vger.kernel.org
Subject: Re: [PATCH 00/18] i2c: remove printout on handled timeouts
Date: Wed, 24 Apr 2024 15:44:19 +0300 [thread overview]
Message-ID: <CAHp75VdqcYn9RDVf63N7HL=nQLvFRt8cSO3EfbzAxLKNkwF-Kg@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VfEvifLjPRQ+xsKipjwXA-APR7m_au6OJjafeXp6Wiyxg@mail.gmail.com>
On Wed, Apr 24, 2024 at 3:41 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Wed, Apr 24, 2024 at 12:00 PM Wolfram Sang
> <wsa+renesas@sang-engineering.com> wrote:
> > On Wed, Apr 24, 2024 at 03:08:14AM +0300, Andy Shevchenko wrote:
> > > Wed, Apr 10, 2024 at 01:24:14PM +0200, Wolfram Sang kirjoitti:
> > > > While working on another cleanup series, I stumbled over the fact that
> > > > some drivers print an error on I2C or SMBus related timeouts. This is
> > > > wrong because it may be an expected state. The client driver on top
> > > > knows this, so let's keep error handling on this level and remove the
> > > > prinouts from controller drivers.
> > > >
> > > > Looking forward to comments,
> > >
> > > I do not see an equivalent change in I²C core.
> >
> > There shouldn't be. The core neither knows if it is okay or not. The
> > client driver knows.
> >
> > > IIRC in our case (DW or i801 or iSMT) we often have this message as the only
> >
> > Often? How often?
>
> Once in a couple of months I assume. Last time it was a few weeks ago
> that there was a report and they pointed to this very message which
> was helpful.
>
> > > one that points to the issues (on non-debug level), it will be much harder to
> > > debug for our customers with this going away.
> >
> > The proper fix is to print the error in the client driver. Maybe this
> > needs a helper for client drivers which they can use like:
> >
> > i2c_report_error(client, retval, flags);
> >
> > The other thing which is also more helpful IMO is that we have
> > trace_events for __i2c_transfer. There, you can see what was happening
> > on the bus before the timeout. It can easily be that, if device X
> > times out, it was because of the transfer before to device Y which locks
> > up the bus. A simple "Bus timed out" message will not help you a lot
> > there.
>
> The trace events are good to have, not sure if production kernels have
> them enabled, though.
Ah, and to accent on the usefulness of the message that happens before
one thinks about enabling trace events. How usual is that we _expect_
something to fail? Deeper debugging usually happens after we have
noticed the issue. I'm not sure if there is an equivalent to signal
about a problem without expecting it to happen. Is that -ETIMEDOUT
being converted to some message somewhere?
> > And, keep in mind the false positives I mentioned in the coverletter.
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-04-24 12:45 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 11:24 [PATCH 00/18] i2c: remove printout on handled timeouts Wolfram Sang
2024-04-10 11:24 ` [PATCH 01/18] i2c: at91-master: " Wolfram Sang
2024-04-10 11:24 ` [PATCH 02/18] i2c: bcm-iproc: " Wolfram Sang
2024-04-10 11:24 ` [PATCH 03/18] i2c: bcm2835: " Wolfram Sang
2024-04-10 11:24 ` [PATCH 04/18] i2c: cadence: " Wolfram Sang
2024-04-11 7:09 ` Michal Simek
2024-04-10 11:24 ` [PATCH 05/18] i2c: davinci: " Wolfram Sang
2024-04-10 11:24 ` [PATCH 09/18] i2c: nomadik: " Wolfram Sang
2024-04-12 8:39 ` Linus Walleij
2024-04-10 11:24 ` [PATCH 13/18] i2c: rk3x: " Wolfram Sang
2024-04-11 18:59 ` Heiko Stuebner
2024-04-12 21:12 ` Dragan Simic
2024-04-13 6:38 ` Wolfram Sang
2024-04-13 6:44 ` Dragan Simic
2024-04-13 7:10 ` Wolfram Sang
2024-04-13 8:07 ` Dragan Simic
2024-04-13 7:58 ` Heiko Stübner
2024-04-13 8:12 ` Dragan Simic
2024-04-13 14:35 ` Wolfram Sang
2024-04-16 19:02 ` Andi Shyti
2024-04-10 11:24 ` [PATCH 15/18] i2c: st: " Wolfram Sang
2024-04-10 11:24 ` [PATCH 17/18] i2c: uniphier-f: " Wolfram Sang
2024-04-10 11:24 ` [PATCH 18/18] i2c: uniphier: " Wolfram Sang
2024-04-22 22:50 ` [PATCH 00/18] i2c: " Andi Shyti
[not found] ` <ZihNbtiVDkxgUDGk@surfacebook.localdomain>
2024-04-24 9:00 ` Wolfram Sang
2024-04-24 12:41 ` Andy Shevchenko
2024-04-24 12:44 ` Andy Shevchenko [this message]
2024-04-27 18:03 ` 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='CAHp75VdqcYn9RDVf63N7HL=nQLvFRt8cSO3EfbzAxLKNkwF-Kg@mail.gmail.com' \
--to=andy.shevchenko@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-tegra@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.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;
as well as URLs for NNTP newsgroup(s).