]> git.baikalelectronics.ru Git - kernel.git/commit
spi: qup: Ensure done detection
authorVaradarajan Narayanan <varada@codeaurora.org>
Fri, 28 Jul 2017 06:53:00 +0000 (12:23 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 8 Aug 2017 11:15:50 +0000 (12:15 +0100)
commit57f06dc3243827b06b9102cabcaa46a381bfbe93
tree65f2b3f6ce01b103f492055d6607351789bff5fa
parent97a4ef650caeb37cc32f8b5deb3bb96628f82b02
spi: qup: Ensure done detection

This patch fixes an issue where a SPI transaction has completed, but the
done condition is missed.  This occurs because at the time of interrupt the
MAX_INPUT_DONE_FLAG is not asserted.  However, in the process of reading
blocks of data from the FIFO, the last portion of data comes in.

The opflags read at the beginning of the irq handler no longer matches the
current opflag state.  To get around this condition, the block read
function should update the opflags so that done detection is correct after
the return.

Signed-off-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Signed-off-by: Varadarajan Narayanan <varada@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-qup.c