From: David Cohen <david.a.cohen@linux.intel.com>
To: "Michael Büsch" <m@bues.ch>
Cc: Antti Palosaari <crope@iki.fi>,
linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH] fc0011: Reduce number of retries
Date: Tue, 03 Apr 2012 12:58:16 +0300 [thread overview]
Message-ID: <4F7AC9B8.50200@linux.intel.com> (raw)
In-Reply-To: <20120403110503.392c8432@milhouse>
Hi,
On 04/03/2012 12:05 PM, Michael Büsch wrote:
> Now that i2c transfers are fixed, 3 retries are enough.
>
> Signed-off-by: Michael Buesch<m@bues.ch>
>
> ---
>
> Index: linux/drivers/media/common/tuners/fc0011.c
> ===================================================================
> --- linux.orig/drivers/media/common/tuners/fc0011.c 2012-04-03 08:48:39.000000000 +0200
> +++ linux/drivers/media/common/tuners/fc0011.c 2012-04-03 10:44:07.243418827 +0200
> @@ -314,7 +314,7 @@
> if (err)
> return err;
> vco_retries = 0;
> - while (!(vco_cal& FC11_VCOCAL_OK)&& vco_retries< 6) {
> + while (!(vco_cal& FC11_VCOCAL_OK)&& vco_retries< 3) {
Do we need to retry at all?
I2C core layer is responsible to retry is xfer() fails.
If failure is propagated to driver I'd assume:
- I2C is still buggy by not return -EAGAIN on arbitrary error
- I2C xfer failed for real.
Look this piece of code from i2c-core.c:
int i2c_transfer()
{
...
/* Retry automatically on arbitration loss */
orig_jiffies = jiffies;
for (ret = 0, try = 0; try <= adap->retries; try++) {
ret = adap->algo->master_xfer(adap, msgs, num);
if (ret != -EAGAIN)
break;
if (time_after(jiffies, orig_jiffies +
adap->timeout))
break;
}
...
}
BR,
David
> /* Reset the tuner and try again */
> err = fe->callback(priv->i2c, DVB_FRONTEND_COMPONENT_TUNER,
> FC0011_FE_CALLBACK_RESET, priv->addr);
>
>
next prev parent reply other threads:[~2012-04-03 9:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 9:05 [PATCH] fc0011: Reduce number of retries Michael Büsch
2012-04-03 9:58 ` David Cohen [this message]
2012-04-03 10:07 ` Michael Büsch
2012-04-03 14:12 ` David Cohen
2012-04-03 15:24 ` Antti Palosaari
2012-04-03 15:33 ` Michael Büsch
2012-04-03 15:41 ` Antti Palosaari
2012-05-07 18:53 ` Antti Palosaari
2012-05-07 21:02 ` Michael Büsch
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=4F7AC9B8.50200@linux.intel.com \
--to=david.a.cohen@linux.intel.com \
--cc=crope@iki.fi \
--cc=linux-media@vger.kernel.org \
--cc=m@bues.ch \
/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).