From: Francesco Dolcini <francesco.dolcini@toradex.com>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: Francesco Dolcini <francesco.dolcini@toradex.com>,
Oleksij Rempel <linux@rempel-privat.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
Oleksandr Suvorov <oleksandr.suvorov@toradex.com>,
linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1] i2c: imx: Retry transfer on transient failure
Date: Tue, 12 Jul 2022 11:14:32 +0200 [thread overview]
Message-ID: <20220712091432.GA319880@francesco-nb.int.toradex.com> (raw)
In-Reply-To: <20220712084716.bw626gt7cwcjt3wq@pengutronix.de>
Hello Marco
On Tue, Jul 12, 2022 at 10:47:16AM +0200, Marco Felsch wrote:
> On 22-07-12, Francesco Dolcini wrote:
> > From: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
> >
> > Set the i2c_adapter retries field to a sensible value. This allows
> > the i2c core to retry master_xfer()/master_xfer_atomic() when it
> > returns -EAGAIN. Currently the i2c-imx driver returns -EAGAIN only
> > on Tx arbitration failure (I2SR_IAL).
> >
> > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
> > Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
> > ---
> > drivers/i2c/busses/i2c-imx.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> > index e9e2db68b9fb..26738e713c94 100644
> > --- a/drivers/i2c/busses/i2c-imx.c
> > +++ b/drivers/i2c/busses/i2c-imx.c
> > @@ -54,6 +54,7 @@
> > #define DRIVER_NAME "imx-i2c"
> >
> > #define I2C_IMX_CHECK_DELAY 30000 /* Time to check for bus idle, in NS */
> > +#define I2C_IMX_MAX_RETRIES 3 /* Retries on arbitration loss */
>
> Just one question: Why 3 and should we document this within the commit
> message?
In our tests 3 seems big enough to solve some sporadic failure we
experienced, and small enough to not have any kind of drawback. This is
the meaning of "sensible" value I have in the commit message, other
drivers use the same value.
Francesco
next prev parent reply other threads:[~2022-07-12 9:14 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 [this message]
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
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=20220712091432.GA319880@francesco-nb.int.toradex.com \
--to=francesco.dolcini@toradex.com \
--cc=festevam@gmail.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=oleksandr.suvorov@toradex.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@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