public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Francesco Dolcini <francesco.dolcini@toradex.com>
Cc: Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Marco Felsch <m.felsch@pengutronix.de>,
	Oleksij Rempel <linux@rempel-privat.de>,
	Wolfram Sang <wsa@kernel.org>,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Oleksandr Suvorov <oleksandr.suvorov@foundries.io>,
	Fabio Estevam <festevam@gmail.com>,
	linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH v1] i2c: imx: Retry transfer on transient failure
Date: Fri, 15 Jul 2022 10:34:00 +0200	[thread overview]
Message-ID: <20220715083400.q226rrwxsgt4eomp@pengutronix.de> (raw)
In-Reply-To: <20220715072432.GA562594@francesco-nb.int.toradex.com>

[-- Attachment #1: Type: text/plain, Size: 1884 bytes --]

Hello Francesco,

On Fri, Jul 15, 2022 at 09:24:32AM +0200, Francesco Dolcini wrote:
> On Fri, Jul 15, 2022 at 08:49:31AM +0200, Uwe Kleine-König wrote:
> > Unless you have a multi-controller setup an arbitration loss is a
> > problem with the signal integrity. And increasing the retry count is
> > only a work around.
> Fair enough.
> 
> Regarding your comment, I was wondering:
> 
> 1. There is currently no easy way to enable the retry on arbitration
> lost at system level in case the I2C bus is multimaster. Unless we
> consider setting the retries value using I2C_RETRIES ioctl the way to
> go. Not my specific problem, but I wonder if this situation is relevant
> in practice.

I think multi-controller is quite unusual. I never saw one, but that
might just be my bubble.

> 2. We do have an I2C bus recovery mechanism implemented to recover from
> a stuck bus, isn't this a workaround as retrying on arbitration lost in a
> non-multimaster setup?

It depends, if you do it to recover after a transfer failure, it would
indeed consider it a work around covering the real problem. But
sometimes there is no practical way around such work arounds. I happens
from time to time that the reason for problem is known, but fixing the
hardware is no option, then you need such workrounds. (This applies to
both, retrying the transfers and resetting the bus.)

Note that even without signal integrity problems an i2c bus can get
stuck. E.g. if the controller resets in the middle of a transfer.

> I guess this discussion is no longer about the original patch I sent,
> but from my point of view still interesting, real-life I2C is not
> perfect sometimes ... 

:-)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-07-15  8:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12  8:24 [PATCH v1] i2c: imx: Retry transfer on transient failure Francesco Dolcini
2022-07-12  8:47 ` Marco Felsch
2022-07-12  9:14   ` Francesco Dolcini
2022-07-12 11:32   ` Wolfram Sang
2022-07-12 12:02     ` Marco Felsch
2022-07-12  9:05 ` Uwe Kleine-König
2022-07-12 10:05   ` Francesco Dolcini
2022-07-13 11:57     ` Francesco Dolcini
2022-07-13 13:24       ` Oleksij Rempel
2022-07-13 13:43         ` Francesco Dolcini
2022-07-13 15:57           ` Oleksij Rempel
2022-07-13 20:25             ` Francesco Dolcini
2022-07-14  7:07               ` Oleksij Rempel
2022-07-14  7:34                 ` Francesco Dolcini
2022-07-15  6:49                   ` Uwe Kleine-König
2022-07-15  7:24                     ` Francesco Dolcini
2022-07-15  8:34                       ` Uwe Kleine-König [this message]
2022-07-15 11:45                         ` Francesco Dolcini

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=20220715083400.q226rrwxsgt4eomp@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=festevam@gmail.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux@rempel-privat.de \
    --cc=m.felsch@pengutronix.de \
    --cc=o.rempel@pengutronix.de \
    --cc=oleksandr.suvorov@foundries.io \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=wsa@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