kernel-ark/drivers/i2c
Russell King 4243fa0bad I2C: mv64xxx: fix race between FSM/interrupt and process context
Asking for a multi-part message to be handled by this driver is racy; it
has been observed that the following sequence is possible with this
driver:

	- send start
	- send address + write
	- send data
	- send (repeated) start
	- send address + write
	- send (repeated) start
	- send address + read
	- unrecoverable bus hang (except by system reset)

The problem is that the interrupt handling sees the next event after the
first repeated start is sent - the IFLG bit is set in the register even
though INTEN is disabled.

Let's fix this by moving all of the message processing into interrupt
context, rather than having it partly in IRQ and partly in process
context.  This allows us to move immediately to the next message in the
interrupt handler and get on with the transfer, rather than incuring a
couple of scheduling switches to get the next message.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-06-05 23:06:48 +02:00
..
algos Linux 3.6-rc7 2012-10-08 12:46:32 +02:00
busses I2C: mv64xxx: fix race between FSM/interrupt and process context 2013-06-05 23:06:48 +02:00
muxes Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
i2c-boardinfo.c i2c: Update the FSF address 2012-03-26 21:47:19 +02:00
i2c-core.c i2c: suppress lockdep warning on delete_device 2013-05-17 22:49:45 +02:00
i2c-core.h i2c: Update the FSF address 2012-03-26 21:47:19 +02:00
i2c-dev.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
i2c-mux.c i2c: Make the return type of i2c_del_mux_adapter() void 2013-04-02 07:07:32 +02:00
i2c-smbus.c i2c-smbus: Convert kzalloc to devm_kzalloc 2012-10-05 22:23:52 +02:00
i2c-stub.c i2c-stub: Move to drivers/i2c 2012-10-28 21:37:00 +01:00
Kconfig drivers/i2c: remove !S390 dependency, add missing GENERIC_HARDIRQS dependencies 2013-03-11 09:59:02 +01:00
Makefile i2c-stub: Move to drivers/i2c 2012-10-28 21:37:00 +01:00