From d6d1a4d7f750e3a20470fede781777b7056ebfcb Mon Sep 17 00:00:00 2001 From: Fugang Duan Date: Fri, 26 May 2017 10:53:37 +0800 Subject: [PATCH] MLK-14980 tty: serial: fsl_lpuart: remove unnecessary .async_tx_ack() lpuart only use NXP/FSL eDMA dmaengine in i.MX/Vybrid/LS1021a platform, and eDMA driver don't reuse descriptor then no need to check the flag DMA_CTRL_ACK. And current eDMA driver use virt chan mechanism and free tx_descriptor memory after .callback(), but .lpuart_timer_func() first to terminate the chans that free the tx_descriptor memory, then access the tx->flags, which cause kmem_cache_alloc() failed to allocate the freed memory. So remove the unnecessary .async_tx_ack(). Signed-off-by: Fugang Duan --- drivers/tty/serial/fsl_lpuart.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 54f0aebb41f6..ceaf709b6161 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -840,7 +840,6 @@ static void lpuart_dma_rx_complete(void *arg) struct dma_tx_state state; int count; - async_tx_ack(sport->dma_rx_desc); mod_timer(&sport->lpuart_timer, jiffies + sport->dma_rx_timeout); spin_lock_irqsave(&sport->port.lock, flags); @@ -871,7 +870,6 @@ static void lpuart_timer_func(unsigned long data) dmaengine_tx_status(sport->dma_rx_chan, sport->dma_rx_cookie, &state); dmaengine_terminate_all(sport->dma_rx_chan); count = sport->rxdma_len - state.residue; - async_tx_ack(sport->dma_rx_desc); spin_lock_irqsave(&sport->port.lock, flags); -- 2.17.1