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)
commitcd595b99af24b8efa4a6a8889ad65f4d270fd644
tree65f2b3f6ce01b103f492055d6607351789bff5fa
parent5884e17ef3cb3dac2e83e466246cf033bfba0e2f
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