From: Adam Baker <linux@baker-net.org.uk>
To: Antti Palosaari <crope@iki.fi>, linux-media@vger.kernel.org
Subject: Re: [PATCH 1/2] si2168: Implement own I2C adapter locking
Date: Sun, 31 May 2015 17:56:46 +0100 [thread overview]
Message-ID: <556B3D4E.6090509@baker-net.org.uk> (raw)
In-Reply-To: <1432933510-19028-1-git-send-email-crope@iki.fi>
On 29/05/15 22:05, Antti Palosaari wrote:
> We need own I2C locking because of tuner I2C adapter/repeater.
> Firmware command is executed using I2C send + reply message. Default
> I2C adapter locking protects only single I2C operation, not whole
> send + reply sequence as needed. Due to that, it was possible tuner
> I2C message interrupts firmware command sequence.
>
> Reported-by: Adam Baker <linux@baker-net.org.uk>
> Signed-off-by: Antti Palosaari <crope@iki.fi>
> ---
Reviewed-by: Adam Baker <linux@baker-net.org.uk>
Having looked over this I can't see any remaining deadlocks or failures
to provide adequate locking.
Without a detailed device datasheet (the public datasheet is only the
short version) it is impossible to say
1) If accessing the I2C gate in between a read and write cycle would
actually cause a problem, if it doesn't then a simpler solution would be
possible but it seems reasonable to assume that it does.
2) How effective the retry mechanism is. The current behaviour that
retries the read cycle without retrying the preceding write means that
it isn't possible to pass the read and write messages as multiple
messages to i2c_transfer and let that handle the locking for us.
Do you know how likely it is for this issue to be triggered without the
signal stats patch applied? My suspicion is that it could only happen if
user space deliberately tried changing parameters on the tuner and
frontend at the same time from different threads and hence the fix isn't
worth pushing to stable.
Adam
next prev parent reply other threads:[~2015-05-31 17:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 21:05 [PATCH 1/2] si2168: Implement own I2C adapter locking Antti Palosaari
2015-05-29 21:05 ` [PATCH 2/2] si2157: implement signal strength stats Antti Palosaari
2015-05-31 22:30 ` Adam Baker
2015-05-31 16:56 ` Adam Baker [this message]
2015-06-01 7:47 ` [PATCH 1/2] si2168: Implement own I2C adapter locking Antti Palosaari
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=556B3D4E.6090509@baker-net.org.uk \
--to=linux@baker-net.org.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox