[PATCH v5 12/14] tty: serial: qcom-geni-serial: stop operations in progress at shutdown

Bartosz Golaszewski posted 14 patches 2 years, 9 months ago
There is a newer version of this series
[PATCH v5 12/14] tty: serial: qcom-geni-serial: stop operations in progress at shutdown
Posted by Bartosz Golaszewski 2 years, 9 months ago
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

We don't stop transmissions in progress at shutdown. This is fine with
FIFO SE mode but with DMA it causes trouble so fix it now.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 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 808b0250d51e..1dfc0122ff53 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -864,6 +864,8 @@ static void get_tx_fifo_size(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)
-- 
2.37.2
Re: [PATCH v5 12/14] tty: serial: qcom-geni-serial: stop operations in progress at shutdown
Posted by Krzysztof Kozlowski 2 years, 9 months ago
On 02/12/2022 09:55, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> We don't stop transmissions in progress at shutdown. This is fine with
> FIFO SE mode but with DMA it causes trouble so fix it now.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---

This looks like a fix (even if without SE DMA impact is not visible), so
how about Fixes tag and moving it to the beginning of patchset?

Best regards,
Krzysztof