Skip to content

Commit 1d4bd0e

Browse files
SherrySun5gregkh
authored andcommitted
tty: serial: fsl_lpuart: disable Rx/Tx DMA in lpuart32_shutdown()
UARTBAUD_RDMAE and UARTBAUD_TDMAE are enabled in lpuart32_startup(), but lpuart32_shutdown() not disable them, only free the dma ring buffer and release the dma channels, so here disable the Rx/Tx DMA first in lpuart32_shutdown(). Fixes: 42b6876 ("serial: fsl_lpuart: DMA support for 32-bit variant") Signed-off-by: Sherry Sun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e1d91dd commit 1d4bd0e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/tty/serial/fsl_lpuart.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,6 +1799,11 @@ static void lpuart32_shutdown(struct uart_port *port)
17991799

18001800
spin_lock_irqsave(&port->lock, flags);
18011801

1802+
/* disable Rx/Tx DMA */
1803+
temp = lpuart32_read(port, UARTBAUD);
1804+
temp &= ~(UARTBAUD_TDMAE | UARTBAUD_RDMAE);
1805+
lpuart32_write(port, temp, UARTBAUD);
1806+
18021807
/* disable Rx/Tx and interrupts */
18031808
temp = lpuart32_read(port, UARTCTRL);
18041809
temp &= ~(UARTCTRL_TE | UARTCTRL_RE | UARTCTRL_ILIE |

0 commit comments

Comments
 (0)