aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2012-11-22 02:06:30 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-26 18:38:44 -0500
commitd7ffb9329012a517575e4c4d49480b6ce0d1529e (patch)
tree6a1064c8981f1ab66086ab4fc843946d754fbdfd /drivers/tty
parenta5919442bc61846e36011671df0d67c72275337e (diff)
serial: mxs-auart: unmap the scatter list before we copy the data
We should first unmap the DMA scatter list for receiving data, and then copy the data from the DMA buffer. The old code misses unmap the scatter list for RX. This patch fixes it. Signed-off-by: Huang Shijie <b32955@freescale.com> Tested-by: Lauri Hintsala <lauri.hintsala@bluegiga.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/mxs-auart.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index f56d6b92cf38..6db23b035efe 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -461,6 +461,8 @@ static void dma_rx_callback(void *arg)
461 int count; 461 int count;
462 u32 stat; 462 u32 stat;
463 463
464 dma_unmap_sg(s->dev, &s->rx_sgl, 1, DMA_FROM_DEVICE);
465
464 stat = readl(s->port.membase + AUART_STAT); 466 stat = readl(s->port.membase + AUART_STAT);
465 stat &= ~(AUART_STAT_OERR | AUART_STAT_BERR | 467 stat &= ~(AUART_STAT_OERR | AUART_STAT_BERR |
466 AUART_STAT_PERR | AUART_STAT_FERR); 468 AUART_STAT_PERR | AUART_STAT_FERR);