serial: 8250_dma: no need to sync RX buffer
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 30 Sep 2015 07:04:17 +0000 (10:04 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 18:12:25 +0000 (19:12 +0100)
RX buffer is allocated from DMA coherent memory. Thus there is no need to call
DMA sync API for it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dma.c

index 21d01a491405a2c52cd1ec02f3198fa4c6b8f10c..b50307129901c39436b3c7170aae1fe63cc3aac3 100644 (file)
@@ -54,9 +54,6 @@ static void __dma_rx_complete(void *param)
        struct dma_tx_state     state;
        int                     count;
 
-       dma_sync_single_for_cpu(dma->rxchan->device->dev, dma->rx_addr,
-                               dma->rx_size, DMA_FROM_DEVICE);
-
        dma->rx_running = 0;
        dmaengine_tx_status(dma->rxchan, dma->rx_cookie, &state);
 
@@ -156,9 +153,6 @@ int serial8250_rx_dma(struct uart_8250_port *p, unsigned int iir)
 
        dma->rx_cookie = dmaengine_submit(desc);
 
-       dma_sync_single_for_device(dma->rxchan->device->dev, dma->rx_addr,
-                                  dma->rx_size, DMA_FROM_DEVICE);
-
        dma_async_issue_pending(dma->rxchan);
 
        return 0;