linux/drivers/i2c
Jon Povey 4bba0fd8d1 i2c-davinci: Fix race when setting up for TX
When setting up to transmit, a race exists between the ISR and
i2c_davinci_xfer_msg() trying to load the first byte and adjust counters.
This is mostly visible for transmits > 1 byte long.

The hardware starts sending immediately that MDR is loaded. IMR trickery
doesn't work because if we start sending, finish the first byte and an
XRDY event occurs before we load IMR to unmask it, we never get an
interrupt, and we timeout.

Move the MDR load after DXR,IMR loads to avoid this race without locking.

Tested on DM355 connected to Techwell TW2836 and Wolfson WM8985

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-09-28 00:05:08 +01:00
..
algos i2c-algo-pca: Fix coding style issues 2010-05-21 18:41:00 +02:00
busses i2c-davinci: Fix race when setting up for TX 2010-09-28 00:05:08 +01:00
muxes i2c: I2C bus multiplexer driver pca954x 2010-08-11 18:21:03 +02:00
i2c-boardinfo.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
i2c-core.c i2c: Multiplexed I2C bus core support 2010-08-11 18:21:02 +02:00
i2c-core.h i2c: Use rwsem instead of mutex for board info 2009-06-19 16:58:20 +02:00
i2c-dev.c i2c: Multiplexed I2C bus core support 2010-08-11 18:21:02 +02:00
i2c-mux.c i2c: Multiplexed I2C bus core support 2010-08-11 18:21:02 +02:00
i2c-smbus.c i2c: Remove all i2c_set_clientdata(client, NULL) in drivers 2010-06-03 11:33:58 +02:00
Kconfig i2c: I2C bus multiplexer driver pca954x 2010-08-11 18:21:03 +02:00
Makefile i2c: I2C bus multiplexer driver pca954x 2010-08-11 18:21:03 +02:00