]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
serial: omap8250: Terminate rx dma only for flushes
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 10 Apr 2016 05:14:37 +0000 (22:14 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Apr 2016 16:26:55 +0000 (09:26 -0700)
DMA completed normally does not require termination; only terminate
paused rx dma stemming from rx dma flush.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_omap.c

index 8579b0ced093ebafa2b99d091f5b8ac8bb6e2e93..2c44c792d5865addd380a21dfc70f5f62401d8c5 100644 (file)
@@ -767,7 +767,6 @@ static void __dma_rx_do_complete(struct uart_8250_port *p)
 
        dma->rx_running = 0;
        dmaengine_tx_status(dma->rxchan, dma->rx_cookie, &state);
-       dmaengine_terminate_all(dma->rxchan);
 
        count = dma->rx_size - state.residue;
 
@@ -808,6 +807,7 @@ 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)