patch "serial: sh-sci: Stop dmaengine transfer in sci_stop_tx()" added to tty-next
Subsystems (2)
This is a note to let you know that I've just added the patch titled
serial: sh-sci: Stop dmaengine transfer in sci_stop_tx()
to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-next branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release during the merge window.
If you have any questions about this process, please let me know.
From 08a84410a04f05c7c1b8e833f552416d8eb9f6fe Mon Sep 17 00:00:00 2001
From: Yoshihiro Shimoda <[email protected]>
Date: Thu, 10 Jun 2021 20:08:06 +0900
Subject: serial: sh-sci: Stop dmaengine transfer in sci_stop_tx()
Stop dmaengine transfer in sci_stop_tx(). Otherwise, the following message is possible output when system enters suspend and while transferring data, because clearing TIE bit in SCSCR is not able to stop any dmaengine transfer.
sh-sci e6550000.serial: ttySC1: Unable to drain transmitter
Note that this driver has already used some #ifdef in the .c file so that this patch also uses #ifdef to fix the issue. Otherwise, build errors happens if the CONFIG_SERIAL_SH_SCI_DMA is disabled.
--- drivers/tty/serial/sh-sci.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/tty/serial/sh-sci.c +8 -0
@@ -611,6 +611,14 @@ static void sci_stop_tx(struct uart_port *port) ctrl &= ~SCSCR_TIE ;serial_port_out (port,SCSCR , ctrl); + +#ifdef CONFIG_SERIAL_SH_SCI_DMA +if (to_sci_port (port)->chan_tx && + !dma_submit_error (to_sci_port (port)->cookie_tx)) { +dmaengine_terminate_async (to_sci_port (port)->chan_tx); +to_sci_port (port)->cookie_tx = -EINVAL ; + } +#endif }static void sci_start_rx (struct uart_port *port)
Signature · 1 line
2.32.0