]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
serial: sh-sci: Stop dmaengine transfer in sci_stop_tx()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thu, 10 Jun 2021 11:08:06 +0000 (20:08 +0900)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 13 Aug 2021 07:29:50 +0000 (09:29 +0200)
commite0ae1ef7139062f0eca7f0ea890f88302b37eef0
treea9167f00893cc25b2f995b594c54990fb9161c77
parent62db20f7b9b569630e0fdb26b1e94221802ce821
serial: sh-sci: Stop dmaengine transfer in sci_stop_tx()

BugLink: https://bugs.launchpad.net/bugs/1938340
commit 08a84410a04f05c7c1b8e833f552416d8eb9f6fe upstream.

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.

Fixes: 73a19e4c0301 ("serial: sh-sci: Add DMA support.")
Cc: <stable@vger.kernel.org> # v4.9+
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20210610110806.277932-1-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/tty/serial/sh-sci.c