spi/omap-mcspi: Fix the spi task hangs waiting dma_rx
authorJorge A. Ventura <jorge.araujo.ventura@gmail.com>
Sat, 9 Aug 2014 21:06:58 +0000 (16:06 -0500)
committerMark Brown <broonie@linaro.org>
Mon, 11 Aug 2014 18:55:51 +0000 (19:55 +0100)
The spi hangs waiting the completion of omap2_mcspi_rx_callback.

Signed-off-by: Jorge A. Ventura <jorge.araujo.ventura@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
drivers/spi/spi-omap2-mcspi.c

index 68441fa..352eed7 100644 (file)
@@ -329,7 +329,8 @@ static void omap2_mcspi_set_fifo(const struct spi_device *spi,
 disable_fifo:
        if (t->rx_buf != NULL)
                chconf &= ~OMAP2_MCSPI_CHCONF_FFER;
-       else
+
+       if (t->tx_buf != NULL)
                chconf &= ~OMAP2_MCSPI_CHCONF_FFET;
 
        mcspi_write_chconf0(spi, chconf);