From: "Rémi Cardona" <remi.cardona@smartjog.com>
To: Antti Palosaari <crope@iki.fi>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 2/2] [media] ds3000: properly report firmware loading issues
Date: Mon, 03 Sep 2012 15:27:43 +0200 [thread overview]
Message-ID: <5044B04F.6080108@smartjog.com> (raw)
In-Reply-To: <503F8E14.4010006@iki.fi>
On 08/30/2012 06:00 PM, Antti Palosaari wrote:
> hmm, looks like ds3000_readreg() logic is still a little bit broken. It
> checks count of sent messages and compares it to 2. But if I2C-adapter
> sends only 1 message or 3 (which should not be possible) function return
> that count instead of -EREMOTEIO. OK, quite rare situation, but one
> point more to fail if I2C-adapter has also bug.
You're absolutely right. The logic is completely awkward. I'm currently
working on a new patch series that will clean up all the register
reading/writing functions to properly check i2c_transfer()'s return code.
> But that happens for return value 0 too. Could it be the issue?
> I2C-adapter returns 0 for some reason? Bug in I2C-adapter with bug in
> ds3000_readreg() implementation?
[...]
> You basically see two different kind of errors, 1) bus communication
> fails, eg. usb timeouts. 2) chips returns error status. Later cases the
> error could come from the this could come from the firmware if chip uses
> firmware or from the silicon. It could be from the I2C-adapter firmware.
Right now, I just have no idea. Right now, the overwhelming majority of
the cards we tested with a recent kernel (about 60 units) are working
just fine with the code as-is.
My main (if not sole) objective for now is to make it easier for us (but
hopefully for others too) to find defective cards/chips.
> Add sleep after the each operation. Good place to add sleep is
> I2C-adapter. I2C-adapters usually supports two different operations,
> write and read + write using repeated START condition. Former us used
> typically for register write and later for register read.
>
> 500us is good choice. If it is only that one register read which causes
> problems, how about repeating it?
I'll first see how our units are behaving with the upcoming patches but
I'll definitely keep this in mind as a next step.
Thanks again,
Rémi
next prev parent reply other threads:[~2012-09-03 13:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-30 9:36 [PATCH RFC 0/2] ds3000 firmware loading improvements Rémi Cardona
2012-08-30 9:36 ` [PATCH 1/2] [media] ds3000: Remove useless 'locking' Rémi Cardona
2012-09-03 14:13 ` Rémi Cardona
2012-08-30 9:36 ` [PATCH 2/2] [media] ds3000: properly report firmware loading issues Rémi Cardona
2012-08-30 13:39 ` Antti Palosaari
2012-08-30 15:21 ` Rémi Cardona
2012-08-30 16:00 ` Antti Palosaari
2012-09-03 13:27 ` Rémi Cardona [this message]
2012-08-31 8:29 ` Re: [PATCH 2/2] [media] ds3000: properly report firmware loadingissues nibble.max
2012-09-03 14:11 ` Rémi Cardona
2012-09-04 2:19 ` nibble.max
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=5044B04F.6080108@smartjog.com \
--to=remi.cardona@smartjog.com \
--cc=crope@iki.fi \
--cc=linux-media@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.