From: Stefan Agner Date: Mon, 26 Jan 2015 00:10:16 +0000 (+0100) Subject: tty: serial: fsl_lpuart: terminate DMA on buffer flush X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~82^2~55 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfc2e07f910891516c8eeef61859fa17369fea9f;p=pandora-kernel.git tty: serial: fsl_lpuart: terminate DMA on buffer flush On uart buffer flush, serial core resets the circular buffer. If a DMA transfer is in progress at that time, the callback lpuart_dma_tx_complete will move buffer's tail unconditionally, hence tail moves beyond head. Use the flush_buffer hook to terminate the DMA imeaditely and avoid lpuart_dma_tx_complete being called in this situation. This bug often showed up while shutdown and lead to duplicate serial console output. Signed-off-by: Stefan Agner Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed