]> git.baikalelectronics.ru Git - kernel.git/commit
spi: spi-xilinx: Remove ISR race condition
authorPeter Crosthwaite <peter.crosthwaite@petalogix.com>
Tue, 4 Jun 2013 14:02:34 +0000 (16:02 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 4 Jun 2013 17:32:19 +0000 (18:32 +0100)
commitb59cf6f72ea65715071c4a324e79510109cce1a6
tree1708d43440a40b87ce0531941a91f09c8d30f507
parentc8ee1052d08c618e2b5993b5619124af3d2e89ab
spi: spi-xilinx: Remove ISR race condition

The ISR currently consumes the rx buffer data and re-enables transmission
from within interrupt context. This is bad because if the interrupt
occurs again before the ISR exits, the new interrupt will be erroneously
cleared by the still completing ISR.

Simplified the ISR by just setting the completion variable and exiting with
no action. Then just looped the transmit functionality in
xilinx_spi_txrx_bufs().

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-xilinx.c