public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* CX24116 i2c patch
@ 2011-05-05 12:28 Steven Toth
  2011-05-05 13:15 ` Mauro Carvalho Chehab
  2011-05-05 15:25 ` Devin Heitmueller
  0 siblings, 2 replies; 10+ messages in thread
From: Steven Toth @ 2011-05-05 12:28 UTC (permalink / raw)
  To: Linux-Media

Mauro,

> Subject: [media] cx24116: add config option to split firmware download
> Author:  Antti Palosaari <crope@iki.fi>
> Date:    Wed Apr 27 21:03:07 2011 -0300
>
> It is very rare I2C adapter hardware which can provide 32kB I2C write
> as one write. Add .i2c_wr_max option to set desired max packet size.
> Split transaction to smaller pieces according to that option.

This is none-sense. I'm naking this patch, please unqueue, regress or whatever.

The entire point of the i2c message send is that the i2c drivers know
nothing about the host i2c implementation, and they should not need
to. I2C SEND and RECEIVE are abstract and require no knowledge of the
hardware. This is dangerous and generates non-atomic register writes.
You cannot guarantee that another thread isn't reading/writing to
other registers in the part - breaking the driver.

Please fix the host controller to split the i2c messages accordingly
(and thus keeping the entire transaction atomic).

This is the second time I've seen the 'fix' to a problem by patching
the i2c driver. Fix the i2c bridge else we'll see this behavior
spreading to multiple i2c driver. It's just wrong.

Best,

-- 
Steven Toth - Kernel Labs
http://www.kernellabs.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-05-16 15:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-05 12:28 CX24116 i2c patch Steven Toth
2011-05-05 13:15 ` Mauro Carvalho Chehab
2011-05-05 15:09   ` Jean Delvare
2011-05-05 16:18     ` Mauro Carvalho Chehab
2011-05-16 15:33       ` Jean Delvare
2011-05-05 15:34   ` Devin Heitmueller
2011-05-05 16:38     ` Mauro Carvalho Chehab
2011-05-05 15:25 ` Devin Heitmueller
2011-05-05 16:55   ` Mauro Carvalho Chehab
2011-05-05 22:03     ` Antti Palosaari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox