From d75a50763e978ed8d07df51868c2d56627fac36e Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Thu, 29 Dec 2022 16:50:17 +0100 Subject: [PATCH] UPSTREAM: tty: serial: qcom-geni-serial: stop operations in progress at shutdown We don't stop transmissions in progress at shutdown. This is fine with FIFO SE mode but with DMA (support for which we'll introduce later) it causes trouble so fix it now. Fixes: e83766334f96 ("tty: serial: qcom_geni_serial: No need to stop tx/rx on UART shutdown") Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221229155030.418800-2-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman Bug: 370629635 Change-Id: I8ca4171bf25b530e7fc4bb91fad93358d753b746 (cherry picked from commit d8aca2f96813d51df574a811eda9a2cbed00f261) Signed-off-by: Praveen Talari --- drivers/tty/serial/qcom_geni_serial.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index c2bd300a81cb..8406fe0eb9cb 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -892,6 +892,8 @@ static int setup_fifos(struct qcom_geni_serial_port *port) static void qcom_geni_serial_shutdown(struct uart_port *uport) { disable_irq(uport->irq); + qcom_geni_serial_stop_tx(uport); + qcom_geni_serial_stop_rx(uport); } static int qcom_geni_serial_port_setup(struct uart_port *uport)