spi: fsl-espi: Fix an error that can cause fsl espi task blocked
authorJane Wan <Jane.Wan@gainspeed.com>
Fri, 1 May 2015 23:37:42 +0000 (16:37 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 21 May 2015 21:17:58 +0000 (22:17 +0100)
commit7a0a1759f7b157f56b8f291f3664db4b65963c8a
treeae8e16a171fb08f99d9257e9c610ae43bc8f11d6
parentb787f68c36d49bb1d9236f403813641efa74a031
spi: fsl-espi: Fix an error that can cause fsl espi task blocked

Incorrect condition is used in spin_event_timeout().  When the TX is
done, the SPIE_NF bit in ESPI_SPIE register is set to 1 to indicate the
Tx FIFO is not full.  If the bit is 0, it indicates the Tx FIFO is full.

Due to this error, if the Tx FIFO is full at the beginning, but becomes
not full after handling the Rx FIFO (the SPIE_NF bit is set), the
spin_event_timeout() returns with timeout occurred.  It causes the
interrupt handler not to send completion notification to the thread that
called wait_for_complete() waiting for the notification.

Signed-off-by: Jane Wan <Jane.Wan@gainspeed.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-espi.c
This page took 0.043236 seconds and 5 git commands to generate.