|
|
@@ -782,7 +782,10 @@ static void __dma_rx_do_complete(struct uart_8250_port *p)
|
|
|
dmaengine_tx_status(dma->rxchan, dma->rx_cookie, &state);
|
|
|
|
|
|
count = dma->rx_size - state.residue;
|
|
|
-
|
|
|
+ if (count < dma->rx_size)
|
|
|
+ dmaengine_terminate_async(dma->rxchan);
|
|
|
+ if (!count)
|
|
|
+ goto unlock;
|
|
|
ret = tty_insert_flip_string(tty_port, dma->rx_buf, count);
|
|
|
|
|
|
p->port.icount.rx += ret;
|
|
|
@@ -844,7 +847,6 @@ static void omap_8250_rx_dma_flush(struct uart_8250_port *p)
|
|
|
spin_unlock_irqrestore(&priv->rx_dma_lock, flags);
|
|
|
|
|
|
__dma_rx_do_complete(p);
|
|
|
- dmaengine_terminate_all(dma->rxchan);
|
|
|
}
|
|
|
|
|
|
static int omap_8250_rx_dma(struct uart_8250_port *p)
|