summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorHaikun Wang <haikun.wang@freescale.com>2015-06-09 19:45:37 +0800
committerMark Brown <broonie@kernel.org>2015-06-09 18:35:54 +0100
commitc042af95a26207704ffa71098223c7fcb9e95a9d (patch)
tree79ef4b7aeda6b16b77c4c1c3bc6f908fc2cc68af /Makefile
parentd1f4a38c8139cf87316b16f28b206fd1fd2b31db (diff)
downloadlinux-c042af95a26207704ffa71098223c7fcb9e95a9d.tar.bz2
spi: spi-fsl-dspi: Change the way of increasing spi_message->actual_length
In current driver, we increase actual_length in the following way: message->actual_length += dspi_xxx_transfer() It has two defects. First, transmitting maybe in process when the function call finished and we don't know the transmitting result in this moment. Secondly, the last sentence in function before returning is accessing the SPI register and trigger the data transmitting. If we enable interrupt, interrupt may be generated before function return and we also have the same sentence "message->actual_length += dspi_xxx_transfer()" in the IRQ handler. And usually dspi_xxx_transfer will trigger a new IRQ. The original dspi_xxx_transfer call may return when no new IRQ generate. This may mess the variable spi_message->actual_length. Now we increase the variable in the IRQ handler and only when we get the TCF or EOQ interrupt And we get the transmitted data length from the SPI transfer counter instead of the function return value. Signed-off-by: Haikun Wang <haikun.wang@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions