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>
This commit is contained in:
Huang Shijie 2012-11-22 15:06:30 +08:00 коммит произвёл Greg Kroah-Hartman
Родитель a5919442bc
Коммит d7ffb93290
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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);