提交 d7ffb932 编写于 作者: H Huang Shijie 提交者: Greg Kroah-Hartman

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: NHuang Shijie <b32955@freescale.com>
Tested-by: NLauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a5919442
......@@ -461,6 +461,8 @@ static void dma_rx_callback(void *arg)
int count;
u32 stat;
dma_unmap_sg(s->dev, &s->rx_sgl, 1, DMA_FROM_DEVICE);
stat = readl(s->port.membase + AUART_STAT);
stat &= ~(AUART_STAT_OERR | AUART_STAT_BERR |
AUART_STAT_PERR | AUART_STAT_FERR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册