[PATCH 09/20] Blackfin SPI Driver: do not check for SPI errors if DMA itself did not flag any

Bryan Wu
2009-02-06T07:14:26Z

We only need to check SPI error when DMA failes, cause that
is the DMA IRQ handling routine.

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/spi/spi_bfin5xx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 7652da8..f7a4b5b 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -587,7 +587,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
while (!(read_STAT(drv_data) & SPIF))
cpu_relax();

- if (spistat & RBSY) {
+ if ((dmastat & DMA_ERR) && (spistat & RBSY)) {
msg->state = ERROR_STATE;
dev_err(&drv_data->pdev->dev, "dma receive: fifo/buffer overflow\n");
} else {
--
1.5.6.3